From 6713d6a4cd04a6e91743f687347367f070538e63 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 21 Mar 2017 18:26:39 +0000 Subject: Make sure all MapIt tests can run offline. --- t/app/controller/report_new_mobile.t | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 't/app/controller/report_new_mobile.t') diff --git a/t/app/controller/report_new_mobile.t b/t/app/controller/report_new_mobile.t index 61cb14a1b..3dfb99b2f 100644 --- a/t/app/controller/report_new_mobile.t +++ b/t/app/controller/report_new_mobile.t @@ -1,5 +1,7 @@ use Test::More; use FixMyStreet::TestMech; +use LWP::Protocol::PSGI; +use t::Mock::MapItZurich; my $mech = FixMyStreet::TestMech->new; @@ -7,10 +9,12 @@ my $mech = FixMyStreet::TestMech->new; FixMyStreet::App->log->disable('info'); END { FixMyStreet::App->log->enable('info'); } +LWP::Protocol::PSGI->register(t::Mock::MapItZurich->to_psgi_app, host => 'mapit.zurich'); + subtest "Check signed up for alert when logged in" => sub { FixMyStreet::override_config { - MAPIT_URL => 'http://global.mapit.mysociety.org', - MAPIT_TYPES => [ 'O06' ], + MAPIT_URL => 'http://mapit.zurich', + MAPIT_TYPES => [ 'O08' ], }, sub { $mech->log_in_ok('user@example.org'); $mech->post_ok( '/report/new/mobile', { -- cgit v1.2.3