]> git.openstreetmap.org Git - rails.git/commitdiff
Block non-localhost requests for all tests
authorTom Hughes <tom@compton.nu>
Tue, 10 Jul 2018 17:59:15 +0000 (18:59 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 10 Jul 2018 17:59:15 +0000 (18:59 +0100)
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.

test/application_system_test_case.rb
test/test_helper.rb

index 5b66f580ef800bd47d385ced1f1007d1653745cc..0f46ad3ec3df946d66b18cbb23b8068b94d5c9f3 100644 (file)
@@ -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
index 688cbc113afc4810d3f64e79af494ff7753088ad..83cf909dd94f208c5b89c20e024f8e6941e040f4 100644 (file)
@@ -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