]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/notes_controller_test.rb
Merge remote-tracking branch 'upstream/pull/5744'
[rails.git] / test / controllers / api / notes_controller_test.rb
index f1a0f766c9b23858c4bf9b8d2e646afeb42bb255..ab05dda9e8b310e233f0831945ff159102b24042 100644 (file)
@@ -330,8 +330,6 @@ module Api
       assert_equal "commented", js["properties"]["comments"].last["action"]
       assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
       assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
-      ActionMailer::Base.deliveries.clear
     end
 
     def test_comment_with_notifications_success
@@ -340,7 +338,7 @@ module Api
       second_user = create(:user)
       third_user = create(:user)
 
-      note_with_comments_by_users = create(:note) do |note|
+      note_with_comments_by_users = create(:note, :author => first_user) do |note|
         create(:note_comment, :note => note, :author => first_user)
         create(:note_comment, :note => note, :author => second_user)
       end
@@ -395,8 +393,6 @@ module Api
       assert_equal "commented", js["properties"]["comments"].last["action"]
       assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
       assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
-      ActionMailer::Base.deliveries.clear
     end
 
     def test_comment_twice_success