diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-03-21 18:26:39 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-03-23 18:48:56 +0000 |
commit | 6713d6a4cd04a6e91743f687347367f070538e63 (patch) | |
tree | e74ca4f6044c79b30046dc9bb9d015e9f7d93548 /t/app/controller/report_import.t | |
parent | 8bdf783d5d18dde25b4d2f8309a42c6096cf09d3 (diff) |
Make sure all MapIt tests can run offline.
Diffstat (limited to 't/app/controller/report_import.t')
-rw-r--r-- | t/app/controller/report_import.t | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t index 9201f600c..b956b61ae 100644 --- a/t/app/controller/report_import.t +++ b/t/app/controller/report_import.t @@ -6,6 +6,10 @@ use FixMyStreet::TestMech; use FixMyStreet::App; use Web::Scraper; use Path::Class; +use LWP::Protocol::PSGI; +use t::Mock::MapItZurich; + +LWP::Protocol::PSGI->register(t::Mock::MapItZurich->to_psgi_app, host => 'mapit.zurich'); my $mech = FixMyStreet::TestMech->new; $mech->get_ok('/import'); @@ -255,7 +259,7 @@ subtest "Submit a correct entry (with location)" => sub { # go to the token url FixMyStreet::override_config { ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ], - MAPIT_URL => 'http://mapit.mysociety.org/', + MAPIT_URL => 'http://mapit.uk/', }, sub { $mech->get_ok($token_url); }; @@ -281,7 +285,7 @@ subtest "Submit a correct entry (with location)" => sub { # change the details FixMyStreet::override_config { ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ], - MAPIT_URL => 'http://mapit.mysociety.org/', + MAPIT_URL => 'http://mapit.uk/', }, sub { $mech->submit_form_ok( # { @@ -314,7 +318,7 @@ subtest "Submit a correct entry (with location)" => sub { subtest "Submit a correct entry (with location) to cobrand" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], - MAPIT_URL => 'http://global.mapit.mysociety.org/', + MAPIT_URL => 'http://mapit.zurich/', MAPIT_TYPES => [ 'O08' ], MAPIT_ID_WHITELIST => [], MAP_TYPE => 'Zurich,OSM', |