From 90175c3bdbc1b25eab177dc2d019b86d2854f9a7 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Fri, 28 Oct 2016 13:44:07 +0100 Subject: [PATCH] Stub out requests to gravatar.com during tests. --- test/controllers/user_controller_test.rb | 1 + test/integration/user_creation_test.rb | 2 ++ 2 files changed, 3 insertions(+) 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 -- 2.43.2