aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/reports.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-03 10:38:23 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-03 10:56:20 +0100
commit233a0e5acb9af1ec5ae15c8211dc4da930d6b910 (patch)
tree3d8f4079df56d2e02525d69b874ee10490f22768 /t/app/controller/reports.t
parent52ab1010195bbd92152fb8a2635ca935241c319e (diff)
[UK] Fix ward pages containing ampersands.
Map ward names on their short names, so any processing applies equally to URL and names returned by MapIt.
Diffstat (limited to 't/app/controller/reports.t')
-rw-r--r--t/app/controller/reports.t15
1 files changed, 8 insertions, 7 deletions
diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t
index 8cdfddd1b..c57b15a8e 100644
--- a/t/app/controller/reports.t
+++ b/t/app/controller/reports.t
@@ -115,19 +115,20 @@ $mech->content_contains('5,9,10,22');
$mech->content_contains('2,3,4,4');
FixMyStreet::override_config {
+ ALLOWED_COBRANDS => 'fixmystreet',
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';
+ is $mech->uri->path, '/reports/City+of+Edinburgh';
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');
+ is $mech->uri->path, '/reports/Birmingham';
+ $mech->get_ok('/reports/Birmingham/Bordesley+and+Highgate');
+ is $mech->uri->path, '/reports/Birmingham/Bordesley+and+Highgate';
+ $mech->get_ok('/reports/Birmingham/Bordesley+and+Highgate|Birchfield');
+ is $mech->uri->path, '/reports/Birmingham/Bordesley+and+Highgate%7CBirchfield';
+ $mech->content_contains('Birchfield, Bordesley & Highgate');
};
$mech->get_ok('/reports/Westminster');