-
-
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.
[Merton] Hide TfL River Piers categories
- Loading branch information
1 parent
0047d8d
commit f77895e
Showing
2 changed files
with
25 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -49,14 +49,15 @@ my ($problem2) = $mech->create_problems_for_body(1, $hackney->id, 'Title', { | |
|
||
|
||
FixMyStreet::override_config { | ||
ALLOWED_COBRANDS => [ 'merton' ], | ||
ALLOWED_COBRANDS => [ 'merton', 'tfl' ], | ||
MAPIT_URL => 'http://mapit.uk/', | ||
COBRAND_FEATURES => { | ||
anonymous_account => { | ||
merton => 'anonymous' | ||
}, | ||
}, | ||
}, sub { | ||
ok $mech->host('merton.fixmystreet.com'), 'set host'; | ||
|
||
subtest 'cobrand homepage displays council name' => sub { | ||
$mech->get_ok('/'); | ||
|
@@ -118,6 +119,17 @@ FixMyStreet::override_config { | |
|
||
$mech->not_logged_in_ok; | ||
}; | ||
|
||
subtest "hides the TfL River Piers category" => sub { | ||
my $tfl = $mech->create_body_ok(2500, 'TfL'); | ||
$mech->create_contact_ok(body_id => $tfl->id, category => 'River Piers', email => '[email protected]'); | ||
$mech->create_contact_ok(body_id => $tfl->id, category => 'River Piers - Cleaning', email => '[email protected]'); | ||
$mech->create_contact_ok(body_id => $tfl->id, category => 'River Piers Damage doors and glass', email => '[email protected]'); | ||
|
||
my $json = $mech->get_ok_json('/report/new/ajax?latitude=51.400975&longitude=-0.19655'); | ||
my $categories = [sort keys %{$json->{by_category}}]; | ||
is_deeply $categories, ['Litter', 'Other', 'Potholes', 'Traffic lights'], "Merton doesn't have any River Piers categories"; | ||
}; | ||
}; | ||
|
||
subtest 'only Merton staff can reopen closed reports on Merton cobrand' => sub { | ||
|