diff options
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/bathnes.t | 15 | ||||
-rw-r--r-- | t/cobrand/bristol.t | 10 |
2 files changed, 24 insertions, 1 deletions
diff --git a/t/cobrand/bathnes.t b/t/cobrand/bathnes.t index 6586dcb96..1ebddd05a 100644 --- a/t/cobrand/bathnes.t +++ b/t/cobrand/bathnes.t @@ -11,7 +11,7 @@ my $counciluser = $mech->create_user_ok('counciluser@example.com', name => 'Coun my $normaluser = $mech->create_user_ok('normaluser@example.com', name => 'Normal User'); $normaluser->update({ phone => "+447123456789" }); -$mech->create_problems_for_body(1, $body->id, 'Title', { +my ($problem) = $mech->create_problems_for_body(1, $body->id, 'Title', { areas => ",2651,", category => 'Potholes', cobrand => 'fixmystreet', user => $normaluser, service => 'iOS', extra => { _fields => [ @@ -199,4 +199,17 @@ subtest 'extra CSV columns are present if permission granted' => sub { }; +subtest 'check cobrand correctly reset on each request' => sub { + FixMyStreet::override_config { + 'ALLOWED_COBRANDS' => [ 'bathnes', 'fixmystreet' ], + }, sub { + $mech->log_in_ok( $superuser->email ); + $mech->host('www.fixmystreet.com'); + $mech->get_ok( '/contact?id=' . $problem->id ); + $mech->host('bathnes.fixmystreet.com'); + $mech->get_ok( '/contact?reject=1&id=' . $problem->id ); + $mech->content_contains('Reject report'); + } +}; + done_testing(); diff --git a/t/cobrand/bristol.t b/t/cobrand/bristol.t index b2b8cff13..d4770b6ee 100644 --- a/t/cobrand/bristol.t +++ b/t/cobrand/bristol.t @@ -21,6 +21,16 @@ my $email_contact = $mech->create_contact_ok( send_method => 'Email' ); +subtest 'Reports page works with no reports', sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'bristol' ], + MAPIT_URL => 'http://mapit.uk/', + MAP_TYPE => 'Bristol', + }, sub { + $mech->get_ok("/reports"); + }; +}; + subtest 'Only Open311 categories are shown on Bristol cobrand', sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'bristol' ], |