aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-12-10 13:40:44 +0000
committerDave Arter <davea@mysociety.org>2019-12-12 09:44:39 +0000
commitb835f2db5823ba59bc4c843124b0debfdd5e9247 (patch)
tree73f0ca485ee7099e557857213934b5faa6874f8e /t/app/controller
parentf9c5f6d8162dc073cb3ec066460343df9ba7c8ba (diff)
[TfL] Server-side red route lookup for new report categories
This commit checks the RedRoutes WFS layer on tilma to determine if the point at which a new report is being made is on a TfL red route. The returned categories are then adjusted accordingly: - If on a red route, all TfL categories as well as borough categories specific to street cleaning are returned. - If not on a red route, all borough categories as well as TfL categories that don't require a red route are returned. - This category tweaking doesn't happen on the TfL cobrand, as the JS handles it by signposting users to fixmystreet.com for borough reports. Doing the lookup server side means the app always shows the right categories to the user and prevents them e.g. sending a borough flytipping report to TfL. Fixes https://github.com/mysociety/fixmystreet-commercial/issues/1716
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin/templates.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/app/controller/admin/templates.t b/t/app/controller/admin/templates.t
index 200fbd727..ad5b3e77b 100644
--- a/t/app/controller/admin/templates.t
+++ b/t/app/controller/admin/templates.t
@@ -347,7 +347,7 @@ subtest "TfL cobrand only shows TfL templates" => sub {
subtest "Bromley cobrand only shows Bromley templates" => sub {
FixMyStreet::override_config {
- ALLOWED_COBRANDS => [ 'bromley' ],
+ ALLOWED_COBRANDS => [ 'bromley', 'tfl' ],
}, sub {
$report->update({ category => $bromleycontact->category, bodies_str => $bromley->id });
$mech->log_in_ok( $bromleyuser->email );