diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-04-30 13:56:31 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-05-06 16:09:29 +0100 |
commit | 730d25ae7218d731590b322d4f419a7df6d4e4fb (patch) | |
tree | 17a609759d5fb9ee49e216d485949cd94aa86845 /t/app/controller/admin | |
parent | 683b188b288fe43526e1649c784fa44435559655 (diff) |
Add ability to disallow updates in a category.
Add a tickbox to the category admin, and do not allow updates on
reports made in those selected categories.
Diffstat (limited to 't/app/controller/admin')
-rw-r--r-- | t/app/controller/admin/bodies.t | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t index c73a90da1..7ec7aed75 100644 --- a/t/app/controller/admin/bodies.t +++ b/t/app/controller/admin/bodies.t @@ -261,6 +261,17 @@ subtest 'open311 protection editing' => sub { is $contact->get_extra_metadata('open311_protect'), 1, 'Open311 protect flag set'; }; +subtest 'updates disabling' => sub { + $mech->get_ok('/admin/body/' . $body->id . '/test%20category'); + $mech->submit_form_ok( { with_fields => { + updates_disallowed => 1, + note => 'Disabling updates', + } } ); + $mech->content_contains('Values updated'); + my $contact = $body->contacts->find({ category => 'test category' }); + is $contact->get_extra_metadata('updates_disallowed'), 1, 'Updates disallowed flag set'; +}; + }; # END of override wrap |