diff options
-rw-r--r-- | t/app/controller/report_display.t | 2 | ||||
-rw-r--r-- | t/app/controller/report_import.t | 1 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 20 |
3 files changed, 23 insertions, 0 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index 6958032d9..c16b2656c 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -438,6 +438,7 @@ for my $test ( subtest "Zurich unconfirmeds are 200" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->host( 'zurich.example.com' ); ok $report->update( { state => 'unconfirmed' } ), 'unconfirm report'; @@ -451,6 +452,7 @@ subtest "Zurich unconfirmeds are 200" => sub { subtest "Zurich banners are displayed correctly" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->host( 'zurich.example.com' ); diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t index 480fdd89f..4d0f6e5d1 100644 --- a/t/app/controller/report_import.t +++ b/t/app/controller/report_import.t @@ -321,6 +321,7 @@ subtest "Submit a correct entry (with location) to cobrand" => sub { MAPIT_URL => 'http://global.mapit.mysociety.org/', MAPIT_TYPES => [ 'O08' ], MAPIT_ID_WHITELIST => [], + MAP_TYPE => 'Zurich,OSM', }, sub { ok $mech->host("zurich.example.org"), 'change host to zurich'; diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index a8a1d973e..775ccaf59 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -120,6 +120,7 @@ my $report = $reports[0]; FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/report/' . $report->id ); }; @@ -174,6 +175,7 @@ subtest "changing of categories" => sub { # change the category via the web interface FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->submit_form_ok( { with_fields => { category => 'Cat2' } } ); @@ -219,6 +221,7 @@ subtest "report_edit" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { reset_report_state($report); @@ -315,6 +318,7 @@ subtest "report_edit" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { # Photo publishing $mech->get_ok( '/admin/report_edit/' . $report->id ); @@ -375,6 +379,7 @@ subtest 'SDM' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->content_contains( 'Initial internal note' ); @@ -403,6 +408,7 @@ subtest 'SDM' => sub { subtest 'send_back' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $report->update({ bodies_str => $subdivision->id, state => 'in progress' }); $mech->get_ok( '/admin/report_edit/' . $report->id ); @@ -416,6 +422,7 @@ subtest 'SDM' => sub { subtest 'not contactable' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $report->update({ bodies_str => $subdivision->id, state => 'in progress' }); $mech->get_ok( '/admin/report_edit/' . $report->id ); @@ -449,6 +456,7 @@ $report->update; FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->content_lacks( 'Unbestätigt' ); # Confirmed email @@ -479,6 +487,7 @@ $report = $reports[0]; FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->submit_form_ok( { with_fields => { state => 'confirmed' } } ); @@ -491,6 +500,7 @@ $mech->content_contains('Second Test'); FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->content_contains( 'Unbestätigt' ); @@ -520,6 +530,7 @@ subtest "external report triggers email" => sub { my $EXTERNAL_MESSAGE = 'Look Ma, no hands!'; FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { # required to see body_external field @@ -557,6 +568,7 @@ subtest "external report triggers email" => sub { subtest "Test third_personal boolean setting" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin' ); # required to see body_external field @@ -592,6 +604,7 @@ subtest "external report triggers email" => sub { subtest "Test external wish sending" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { # set as wish $report->discard_changes; @@ -676,6 +689,7 @@ subtest "phone number is mandatory" => sub { ALLOWED_COBRANDS => [ 'zurich' ], MAPIT_ID_WHITELIST => [ 274456 ], MAPIT_GENERATION => 2, + MAP_TYPE => 'Zurich,OSM', }, sub { $user = $mech->log_in_ok( 'dm1@example.org' ); $mech->get_ok( '/report/new?lat=47.381817&lon=8.529156' ); @@ -692,6 +706,7 @@ subtest "phone number is not mandatory for reports from mobile apps" => sub { ALLOWED_COBRANDS => [ 'zurich' ], MAPIT_ID_WHITELIST => [ 423017 ], MAPIT_GENERATION => 4, + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->post_ok( '/report/new/mobile?lat=47.381817&lon=8.529156' , { service => 'iPhone', @@ -722,6 +737,7 @@ subtest "problems can't be assigned to deleted bodies" => sub { MAPIT_URL => 'http://global.mapit.mysociety.org/', MAPIT_TYPES => [ 'O08' ], MAPIT_ID_WHITELIST => [ 423017 ], + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->get_ok( '/admin/body/' . $external_body->id ); $mech->submit_form_ok( { with_fields => { deleted => 1 } } ); @@ -756,6 +772,7 @@ subtest "photo must be supplied for categories that require it" => sub { ALLOWED_COBRANDS => [ 'zurich' ], MAPIT_ID_WHITELIST => [ 274456 ], MAPIT_GENERATION => 2, + MAP_TYPE => 'Zurich,OSM', }, sub { $mech->post_ok( '/report/new', { detail => 'Problem-Bericht', @@ -811,6 +828,7 @@ subtest "test admin_log" => sub { subtest 'email images to external partners' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { reset_report_state($report); @@ -857,6 +875,7 @@ subtest 'email images to external partners' => sub { subtest 'Status update shown as appropriate' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { # ALL closed states must hide the public_response edit, and public ones # must show the answer in blue. @@ -893,6 +912,7 @@ sub contains_or_lacks { subtest 'time_spent' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', }, sub { my $report = $reports[0]; |