From 8eca904388361aff879b379fbe3901a67275efb9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 9 Nov 2016 20:36:09 +0000 Subject: [PATCH] Rename stub_signup_requests to stub_hostip_requests --- test/controllers/site_controller_test.rb | 2 +- test/controllers/user_controller_test.rb | 2 +- test/integration/oauth_test.rb | 2 +- test/integration/page_locale_test.rb | 2 +- test/integration/user_roles_test.rb | 2 +- test/integration/user_terms_seen_test.rb | 2 +- test/test_helper.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index afa50a356..d559760af 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -9,7 +9,7 @@ class SiteControllerTest < ActionController::TestCase Object.const_set("ID_KEY", client_applications(:oauth_web_app).key) Object.const_set("POTLATCH2_KEY", client_applications(:oauth_web_app).key) - stub_signup_requests + stub_hostip_requests end ## diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index e549ec90a..e309b1662 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -4,7 +4,7 @@ class UserControllerTest < ActionController::TestCase api_fixtures def setup - stub_signup_requests + stub_hostip_requests end ## diff --git a/test/integration/oauth_test.rb b/test/integration/oauth_test.rb index 41c678632..2452e6e6b 100644 --- a/test/integration/oauth_test.rb +++ b/test/integration/oauth_test.rb @@ -7,7 +7,7 @@ class OAuthTest < ActionDispatch::IntegrationTest include OAuth::Helper def setup - stub_signup_requests + stub_hostip_requests end def test_oauth10_web_app diff --git a/test/integration/page_locale_test.rb b/test/integration/page_locale_test.rb index ee1f89afa..c95af86ab 100644 --- a/test/integration/page_locale_test.rb +++ b/test/integration/page_locale_test.rb @@ -5,7 +5,7 @@ class PageLocaleTest < ActionDispatch::IntegrationTest def setup I18n.locale = "en" - stub_signup_requests + stub_hostip_requests end def teardown diff --git a/test/integration/user_roles_test.rb b/test/integration/user_roles_test.rb index aaa660dd2..edf1c7c4a 100644 --- a/test/integration/user_roles_test.rb +++ b/test/integration/user_roles_test.rb @@ -4,7 +4,7 @@ class UserRolesTest < ActionDispatch::IntegrationTest fixtures :users, :user_roles def setup - stub_signup_requests + stub_hostip_requests end test "grant" do diff --git a/test/integration/user_terms_seen_test.rb b/test/integration/user_terms_seen_test.rb index deb705f81..e8d3df07a 100644 --- a/test/integration/user_terms_seen_test.rb +++ b/test/integration/user_terms_seen_test.rb @@ -4,7 +4,7 @@ class UserTermsSeenTest < ActionDispatch::IntegrationTest fixtures :users def setup - stub_signup_requests + stub_hostip_requests end def test_api_blocked diff --git a/test/test_helper.rb b/test/test_helper.rb index 5f52bb135..88cfe4831 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -175,7 +175,7 @@ module ActiveSupport stub_request(:get, url).and_return(:status => status, :body => body) end - def stub_signup_requests + def stub_hostip_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") -- 2.43.2