Stub out requests to gravatar.com during tests.
authorAndy Allan <git@gravitystorm.co.uk>
Fri, 28 Oct 2016 12:44:07 +0000 (13:44 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Sun, 30 Oct 2016 09:28:58 +0000 (10:28 +0100)
test/controllers/user_controller_test.rb
test/integration/user_creation_test.rb

index cc8142b..ef4bd0f 100644 (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
 
   ##
index d999b5f..cdf4fcf 100644 (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