From: Tom Hughes Date: Tue, 10 Jul 2018 17:59:15 +0000 (+0100) Subject: Block non-localhost requests for all tests X-Git-Tag: live~2968 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/5ff822083dad8eb52b1a319b271681b5ecefc27d Block non-localhost requests for all tests Only blocking them for the system tests didn't actually work anyway as the setting is global so would apply to all tests after the first system test. --- diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 5b66f580e..0f46ad3ec 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -1,8 +1,6 @@ require "test_helper" require "capybara/poltergeist" -WebMock.disable_net_connect!(:allow_localhost => true) - # Work around weird debian/ubuntu phantomjs # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277 # https://github.com/ariya/phantomjs/issues/14376 diff --git a/test/test_helper.rb b/test/test_helper.rb index 688cbc113..83cf909dd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -6,6 +6,8 @@ require_relative "../config/environment" require "rails/test_help" require "webmock/minitest" +WebMock.disable_net_connect!(:allow_localhost => true) + module ActiveSupport class TestCase include FactoryBot::Syntax::Methods