aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-21 18:26:39 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-23 18:48:56 +0000
commit6713d6a4cd04a6e91743f687347367f070538e63 (patch)
treee74ca4f6044c79b30046dc9bb9d015e9f7d93548 /t/cobrand
parent8bdf783d5d18dde25b4d2f8309a42c6096cf09d3 (diff)
Make sure all MapIt tests can run offline.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/fixamingata.t5
-rw-r--r--t/cobrand/form_extras.t2
2 files changed, 6 insertions, 1 deletions
diff --git a/t/cobrand/fixamingata.t b/t/cobrand/fixamingata.t
index dacf4325a..d6a1c2b34 100644
--- a/t/cobrand/fixamingata.t
+++ b/t/cobrand/fixamingata.t
@@ -1,6 +1,7 @@
use strict;
use warnings;
use Test::More;
+use Test::MockModule;
BEGIN {
use FixMyStreet;
@@ -12,6 +13,10 @@ use mySociety::Locale;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
+# Closest road reverse geocode mock
+my $resolver = Test::MockModule->new('LWP::Simple');
+$resolver->mock('get', sub($) { "<result></result>" });
+
# Front page test
ok $mech->host("www.fixamingata.se"), "change host to FixaMinGata";
diff --git a/t/cobrand/form_extras.t b/t/cobrand/form_extras.t
index c6f6976d5..22a86ef21 100644
--- a/t/cobrand/form_extras.t
+++ b/t/cobrand/form_extras.t
@@ -29,7 +29,7 @@ my $mech = FixMyStreet::TestMech->new;
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { tester => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->get_ok('/around');
$mech->submit_form_ok( { with_fields => { pc => 'EH1 1BB', } }, "submit location" );