]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/notes_controller_test.rb
Merge pull request #1938 from jguthrie100/fix_no_trace_description_error
[rails.git] / test / controllers / notes_controller_test.rb
index 200f284d8080b1345801bd062703f9e01c458b3a..1ebce60b53dcfa8659612e0f31a0b7061005e9f7 100644 (file)
@@ -3,7 +3,7 @@ require "test_helper"
 class NotesControllerTest < ActionController::TestCase
   def setup
     # Stub nominatim response for note locations
-    stub_request(:get, %r{^http://nominatim\.openstreetmap\.org/reverse\?})
+    stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?})
       .to_return(:status => 404)
   end
 
@@ -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