diff options
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/westminster.t | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/t/cobrand/westminster.t b/t/cobrand/westminster.t index 1ceeef6cb..cadd6b18d 100644 --- a/t/cobrand/westminster.t +++ b/t/cobrand/westminster.t @@ -162,21 +162,23 @@ FixMyStreet::override_config { }; }; -FixMyStreet::override_config { - ALLOWED_COBRANDS => 'westminster', - MAPIT_URL => 'http://mapit.uk/', -}, sub { - subtest 'No reporter alert created' => sub { - my $user = $mech->log_in_ok('test@example.org'); - $mech->get_ok('/'); - $mech->submit_form_ok( { with_fields => { pc => 'SW1A1AA' } }, "submit location" ); - $mech->follow_link_ok( { text_regex => qr/skip this step/i, }, "follow 'skip this step' link" ); - $mech->submit_form_ok( { with_fields => { - title => 'Title', detail => 'Detail', category => 'Abandoned bike', name => 'Test Example', - } }, 'submitted okay' ); - is $user->alerts->count, 0; +for my $cobrand (qw(westminster fixmystreet)) { + FixMyStreet::override_config { + ALLOWED_COBRANDS => $cobrand, + MAPIT_URL => 'http://mapit.uk/', + }, sub { + subtest "No reporter alert created in $cobrand" => sub { + my $user = $mech->log_in_ok('test@example.org'); + $mech->get_ok('/'); + $mech->submit_form_ok( { with_fields => { pc => 'SW1A1AA' } }, "submit location" ); + $mech->follow_link_ok( { text_regex => qr/skip this step/i, }, "follow 'skip this step' link" ); + $mech->submit_form_ok( { with_fields => { + title => 'Title', detail => 'Detail', category => 'Abandoned bike', name => 'Test Example', + } }, 'submitted okay' ); + is $user->alerts->count, 0; + }; }; -}; +} my $westminster = FixMyStreet::Cobrand::Westminster->new; subtest 'correct config returned for USRN/UPRN lookup' => sub { |