]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/notes_controller_test.rb
Merge remote-tracking branch 'upstream/pull/5656'
[rails.git] / test / controllers / api / notes_controller_test.rb
index a2c9dc8a4fd8f917b7e43d97b8014ed0cf5c4826..c0c67fc91fc3c7f961706ab9138c7421bc7e7b3f 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
@@ -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
@@ -1066,6 +1062,14 @@ module Api
       assert_select "gpx", :count => 1 do
         assert_select "wpt", :count => 1
       end
+
+      user2 = create(:user)
+      get search_api_notes_path(:user => user2.id, :format => "xml")
+      assert_response :success
+      assert_equal "application/xml", @response.media_type
+      assert_select "osm", :count => 1 do
+        assert_select "note", :count => 0
+      end
     end
 
     def test_search_by_time_success