X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4d73706ff349e043ca62612e977ae600e8cae4ad..7cc1cc618d1512314a5942188db58f03113fe56e:/test/test_helper.rb diff --git a/test/test_helper.rb b/test/test_helper.rb index c45331f20..420512e74 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -174,5 +174,11 @@ module ActiveSupport url = "https://www.gravatar.com/avatar/#{hash}?d=404" stub_request(:get, url).and_return(:status => status, :body => body) end + + def stub_signup_requests + # Controller tests and integration tests use different IPs + stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0") + stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1") + end end end