aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2017-10-04 18:01:41 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-10-06 13:34:16 +0100
commit32ed127efd57bbb5888a3e35637796852168b319 (patch)
tree206c57b55e3d49a16456596a37a0b98c01502780 /t/app/controller
parent70ddda2c5e851c012b2bb98ec74c87490be6dad0 (diff)
Allow ward page to show multiple wards.
URLs have to be manually constructed, but specifying multiple ward names separated by "|" will show all those wards and their reports on the map.
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/reports.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t
index f3958a0a5..7773223dd 100644
--- a/t/app/controller/reports.t
+++ b/t/app/controller/reports.t
@@ -114,6 +114,18 @@ FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->submit_form_ok( { with_fields => { body => $body_edin_id } }, 'Submitted dropdown okay' );
+ is $mech->uri->path, '/reports/City+of+Edinburgh+Council';
+
+ subtest "test ward pages" => sub {
+ $mech->get_ok('/reports/Birmingham/Bad-Ward');
+ is $mech->uri->path, '/reports/Birmingham+City+Council';
+ $mech->get_ok('/reports/Birmingham/Aston');
+ is $mech->uri->path, '/reports/Birmingham+City+Council/Aston';
+ $mech->get_ok('/reports/Birmingham/Aston|Bournville');
+ is $mech->uri->path, '/reports/Birmingham+City+Council/Aston%7CBournville';
+ $mech->content_contains('Aston, Bournville');
+ };
+
$mech->get_ok('/reports/Westminster');
};