From 7cfbf5d5f9e0b54dff4e116f53e06f5fb5b68a34 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 8 Oct 2014 11:25:19 +0100 Subject: Couple of tests missing MapIt override. Looks like Travis doesn't like connections back to itself. --- t/app/controller/index.t | 6 +++++- t/app/controller/report_new.t | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/t/app/controller/index.t b/t/app/controller/index.t index 7fc15ab4b..308dd2c32 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -13,7 +13,11 @@ subtest "check that the form goes to /around" => sub { is $mech->uri->path, '/', "still on '/'"; # submit form - $mech->submit_form_ok( { with_fields => { pc => 'SW1A 1AA', } } ); + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.mysociety.org/', + }, sub { + $mech->submit_form_ok( { with_fields => { pc => 'SW1A 1AA', } } ); + }; # check that we are at /around is $mech->uri->path, '/around', "Got to /around"; diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 79072bcfe..92bc54ba4 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -25,7 +25,11 @@ subtest "test that bare requests to /report/new get redirected" => sub { is $mech->uri->path, '/', "went to /"; is_deeply { $mech->uri->query_form }, {}, "query empty"; - $mech->get_ok('/report/new?pc=SW1A%201AA'); + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.mysociety.org/', + }, sub { + $mech->get_ok('/report/new?pc=SW1A%201AA'); + }; is $mech->uri->path, '/around', "went to /around"; is_deeply { $mech->uri->query_form }, { pc => 'SW1A 1AA' }, "pc correctly transferred"; -- cgit v1.2.3