X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/99ccffe4a9c0521d1202c4f0f1a37f8ef2dc0634..d3d6e9902c8b03fcd31df253cf395f06f757880a:/test/controllers/user_controller_test.rb diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index 14bea6374..cc8142b01 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -2,7 +2,10 @@ require "test_helper" class UserControllerTest < ActionController::TestCase api_fixtures - fixtures :messages + + setup do + stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0") + end ## # test all routes which lead to this controller @@ -1036,6 +1039,8 @@ class UserControllerTest < ActionController::TestCase end def test_api_details + create(:message, :read, :recipient => users(:normal_user)) + # check that nothing is returned when not logged in get :api_details assert_response :unauthorized