]> git.openstreetmap.org Git - rails.git/blob - test/application_system_test_case.rb
Update to iD v2.9.2
[rails.git] / test / application_system_test_case.rb
1 require "test_helper"
2 require "capybara/poltergeist"
3
4 WebMock.disable_net_connect!(:allow_localhost => true)
5
6 # Work around weird debian/ubuntu phantomjs
7 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
8 # https://github.com/ariya/phantomjs/issues/14376
9 ENV["QT_QPA_PLATFORM"] = "phantom" if IO.popen(["phantomjs", "--version"], :err => :close).read.empty?
10
11 ActiveSupport.on_load(:action_dispatch_system_test_case) do
12   ActionDispatch::SystemTesting::Server.silence_puma = true
13 end
14
15 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
16   driven_by :poltergeist, :screen_size => [1400, 1400]
17
18   def initialize(*args)
19     stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
20       .to_return(:status => 404)
21     super(*args)
22   end
23 end