aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_import.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/report_import.t')
-rw-r--r--t/app/controller/report_import.t17
1 files changed, 7 insertions, 10 deletions
diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t
index c8cbcf412..b956b61ae 100644
--- a/t/app/controller/report_import.t
+++ b/t/app/controller/report_import.t
@@ -1,13 +1,15 @@
use strict;
use warnings;
use Test::More;
-use LWP::Protocol::PSGI;
-use t::Mock::MapIt;
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');
@@ -92,8 +94,6 @@ subtest "Test creating bad partial entries" => sub {
};
subtest "Submit a correct entry" => sub {
- LWP::Protocol::PSGI->register(t::Mock::MapIt->run_if_script, host => 'mapit.uk');
-
$mech->get_ok('/import');
$mech->submit_form_ok( #
@@ -156,7 +156,6 @@ subtest "Submit a correct entry" => sub {
phone => '',
may_show_name => '1',
category => '-- Pick a category --',
- gender => undef,
},
"check imported fields are shown";
@@ -193,7 +192,6 @@ subtest "Submit a correct entry" => sub {
phone => '',
may_show_name => '1',
category => '-- Pick a category --',
- gender => undef,
},
"check imported fields are shown";
@@ -261,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,14 +279,13 @@ subtest "Submit a correct entry (with location)" => sub {
phone => '',
may_show_name => '1',
category => '-- Pick a category --',
- gender => undef,
},
"check imported fields are shown";
# 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( #
{
@@ -321,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',