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
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