From: Andy Allan Date: Fri, 28 Oct 2016 12:44:07 +0000 (+0100) Subject: Stub out requests to gravatar.com during tests. X-Git-Tag: live~3692^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/90175c3bdbc1b25eab177dc2d019b86d2854f9a7?ds=sidebyside Stub out requests to gravatar.com during tests. --- diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index cc8142b01..ef4bd0fff 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -5,6 +5,7 @@ class UserControllerTest < ActionController::TestCase setup do stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0") + stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404) end ## diff --git a/test/integration/user_creation_test.rb b/test/integration/user_creation_test.rb index d999b5fb5..cdf4fcfe9 100644 --- a/test/integration/user_creation_test.rb +++ b/test/integration/user_creation_test.rb @@ -7,6 +7,8 @@ class UserCreationTest < ActionDispatch::IntegrationTest I18n.locale = "en" OmniAuth.config.test_mode = true + + stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404) end def teardown