-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UK] Fix All Reports pages for bike providers.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ $resolver->mock('address', sub { $_[1] }); | |
my $body = $mech->create_body_ok( 2514, 'Birmingham', {}, { cobrand => 'birmingham' } ); | ||
$mech->create_body_ok( 2482, 'Bromley', {}, { cobrand => 'bromley' }); | ||
|
||
$mech->create_body_ok(2482, 'Bike provider'); | ||
|
||
my $contact = $mech->create_contact_ok( | ||
body_id => $body->id, | ||
category => 'Traffic lights', | ||
|
@@ -40,6 +42,11 @@ FixMyStreet::override_config { | |
MAPIT_URL => 'http://mapit.uk/', | ||
TEST_DASHBOARD_DATA => $data, | ||
ALLOWED_COBRANDS => [ 'fixmystreet', 'birmingham' ], | ||
COBRAND_FEATURES => { | ||
categories_restriction_bodies => { | ||
tfl => [ 'Bike provider' ], | ||
} | ||
}, | ||
}, sub { | ||
ok $mech->host('www.fixmystreet.com'); | ||
|
||
|
@@ -122,6 +129,14 @@ FixMyStreet::override_config { | |
$mech->content_lacks('Where we send Birmingham'); | ||
}; | ||
|
||
subtest 'Check All Reports page for bike bodies' => sub { | ||
$mech->get_ok('/reports/Bike+provider'); | ||
$mech->content_contains('Bromley'); | ||
$mech->content_lacks('Trowbridge'); | ||
$mech->get_ok('/reports/Bike+provider/Bromley'); | ||
is $mech->uri->path, '/reports/Bike+provider/Bromley'; | ||
}; | ||
|
||
subtest 'check average fix time respects cobrand cut-off date and non-standard reports' => sub { | ||
$mech->log_in_ok('[email protected]'); | ||
my $user = FixMyStreet::DB->resultset('User')->find_or_create({ email => '[email protected]' }); | ||
|