aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-07-16 11:16:34 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-16 11:16:34 +0100
commit3c7df6fa0186251363ea5a61a497b8920ecdb129 (patch)
treedda97f78b62d0637c55afc37b262b82562f22096 /t/app/controller/admin
parentc3899dc611ade1410adc7682f2ed196e341ee577 (diff)
parent9b7df4542b75f4463d0f3de0a8b68db32c2353a6 (diff)
Merge branch 'issues/commercial/1886-site-wide-permissions'
Diffstat (limited to 't/app/controller/admin')
-rw-r--r--t/app/controller/admin/bodies.t27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index 80ee22630..75db6f87c 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -413,4 +413,31 @@ subtest 'check log of the above' => sub {
$mech->content_contains('Edited body <a href="/admin/body/' . $body->id . '">Aberdeen City Council</a>');
};
+subtest 'check update disallowed message' => sub {
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ ALLOWED_COBRANDS => 'bathnes',
+ COBRAND_FEATURES => { updates_allowed => { bathnes => 'open' } }
+ }, sub {
+ $mech->get_ok('/admin/body/' . $body->id .'/test%20category');
+ $mech->content_contains('even if this is unticked, only open reports can have updates left on them.');
+ };
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ ALLOWED_COBRANDS => 'bathnes',
+ COBRAND_FEATURES => { updates_allowed => { bathnes => 'staff' } }
+ }, sub {
+ $mech->get_ok('/admin/body/' . $body->id .'/test%20category');
+ $mech->content_contains('even if this is unticked, only staff will be able to leave updates.');
+ };
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ ALLOWED_COBRANDS => 'bathnes',
+ COBRAND_FEATURES => { updates_allowed => { bathnes => 'reporter' } }
+ }, sub {
+ $mech->get_ok('/admin/body/' . $body->id .'/test%20category');
+ $mech->content_contains('even if this is unticked, only the problem reporter will be able to leave updates');
+ };
+};
+
done_testing();