]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/notes_controller_test.rb
allow moderators to read hidden notes through API
[rails.git] / test / controllers / notes_controller_test.rb
index 4444a2f50b5513bb24c1bd82e301981da47a53ab..1ebce60b53dcfa8659612e0f31a0b7061005e9f7 100644 (file)
@@ -625,6 +625,10 @@ class NotesControllerTest < ActionController::TestCase
     assert_equal "This is a hide comment", js["properties"]["comments"].last["text"]
     assert_equal moderator_user.display_name, js["properties"]["comments"].last["user"]
 
+    get :show, :params => { :id => open_note_with_comment.id, :format => "json" }
+    assert_response :success
+
+    basic_authorization user.email, "test"
     get :show, :params => { :id => open_note_with_comment.id, :format => "json" }
     assert_response :gone
   end