diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-15 17:34:12 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-15 17:34:12 +0100 |
commit | a2a1d29ebb3b6c5a9adbc73ff135aea05390e381 (patch) | |
tree | c8522b5f2a62648e39b90029706cd0938ece3e9d /t/app/controller/around.t | |
parent | 96c584269d7b244ac93cd282470d9abffb99a6c0 (diff) |
Mock MapIt postcode call to fix broken tests.
SW1A 1AA has moved, who'd have thought.
Diffstat (limited to 't/app/controller/around.t')
-rw-r--r-- | t/app/controller/around.t | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t index 03bcebf96..a70116525 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -1,7 +1,9 @@ use strict; use warnings; use Test::More; +use LWP::Protocol::PSGI; +use t::MapIt; use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; @@ -71,8 +73,8 @@ foreach my $test ( foreach my $test ( { pc => 'SW1A 1AA', - latitude => '51.501009', - longitude => '-0.141588', + latitude => '51.5', + longitude => '-2.1', }, { pc => 'TQ 388 773', @@ -82,10 +84,12 @@ foreach my $test ( ) { subtest "check lat/lng for '$test->{pc}'" => sub { + LWP::Protocol::PSGI->register(t::MapIt->run_if_script, host => 'mapit.uk'); + $mech->get_ok('/'); FixMyStreet::override_config { ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ], - MAPIT_URL => 'http://mapit.mysociety.org/', + MAPIT_URL => 'http://mapit.uk/', }, sub { $mech->submit_form_ok( { with_fields => { pc => $test->{pc} } }, "good location" ); |