]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/user_controller_test.rb
Stub out requests to gravatar.com during tests.
[rails.git] / test / controllers / user_controller_test.rb
index 409a93b4e26b61b52ea56e99f18b18713b6173f1..ef4bd0fff040314858032e39fbf286726eb12545 100644 (file)
@@ -3,6 +3,11 @@ require "test_helper"
 class UserControllerTest < ActionController::TestCase
   api_fixtures
 
+  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
+
   ##
   # test all routes which lead to this controller
   def test_routes