]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/notes_controller_test.rb
Don't pass paths to element_single_current_link helper
[rails.git] / test / controllers / notes_controller_test.rb
index 5cffbd702f8ebcfbf4b8eabe09094462e5ca1b0a..b2f14a127ea163d29f0d7bb2a5c7534027872db9 100644 (file)
@@ -144,9 +144,7 @@ class NotesControllerTest < ActionDispatch::IntegrationTest
 
   def test_read_closed_note
     user = create(:user)
 
   def test_read_closed_note
     user = create(:user)
-    closed_note = create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc, :comments_count => 2) do |note|
-      create(:note_comment, :event => "closed", :note => note, :author => user)
-    end
+    closed_note = create(:note_with_comments, :closed, :closed_by => user, :comments_count => 2)
 
     browse_check :note_path, closed_note.id, "notes/show"
     assert_select "div.note-comments ul li", :count => 2
 
     browse_check :note_path, closed_note.id, "notes/show"
     assert_select "div.note-comments ul li", :count => 2