Update site_controller_test to use note and note_comment factories.
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 6 Oct 2016 08:04:06 +0000 (09:04 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 6 Oct 2016 08:04:06 +0000 (09:04 +0100)
test/controllers/site_controller_test.rb

index 453af45..f385ccf 100644 (file)
@@ -265,7 +265,8 @@ class SiteControllerTest < ActionController::TestCase
   # Test editing a specific note
   def test_edit_with_note
     user = users(:public_user)
-    note = notes(:open_note)
+    note = create(:note)
+    create(:note_comment, :author_id => user.id)
 
     get :edit, { :note => note.id }, { :user => user.id }
     assert_response :success