aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/bodies.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-05-12 09:16:00 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-05-12 09:16:00 +0100
commit8534d726c54ff5ac130a5b4dda84ff4a2c00482f (patch)
treea865dc79b25426841a2da09b3d0e93e7d1dbcc29 /t/app/controller/admin/bodies.t
parent37306b9f6f4cb9b58c5e4a7bdc12e90dff879481 (diff)
parentd1622dc20c1623e3f7fb54d72d99370af796c197 (diff)
Merge branch 'tfl-category-restrictions'
Diffstat (limited to 't/app/controller/admin/bodies.t')
-rw-r--r--t/app/controller/admin/bodies.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index 74084afbf..9f7b18cde 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -263,6 +263,16 @@ subtest 'open311 protection editing' => sub {
is $contact->get_extra_metadata('open311_protect'), 1, 'Open311 protect flag set';
};
+subtest 'test assigned_users_only setting' => sub {
+ $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
+ $mech->submit_form_ok( { with_fields => {
+ assigned_users_only => 1,
+ } } );
+ $mech->content_contains('Values updated');
+ my $contact = $body->contacts->find({ category => 'test category' });
+ is $contact->get_extra_metadata('assigned_users_only'), 1;
+};
+
subtest 'updates disabling' => sub {
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->submit_form_ok( { with_fields => {