Stub out requests to gravatar.com during tests.

This commit is contained in:
Andy Allan 2016-10-28 13:44:07 +01:00
parent d3d6e9902c
commit 90175c3bdb
2 changed files with 3 additions and 0 deletions

View file

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

View file

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