diff options
author | Dave Arter <davea@mysociety.org> | 2020-04-27 12:46:21 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2020-04-28 10:33:53 +0100 |
commit | ed896ab1844a903458cba995d7fb70b8b582f950 (patch) | |
tree | bdf276cd6861beaf700ef76ae8561c4ffd345a74 /t/app/controller/admin | |
parent | 813d8a0273764b6215e739f268dc7243d768a205 (diff) |
Add contact flag to protect category/group names from Open311 changes
Adds a new tickbox to the contact editing form that protects the category
and group names from being changed by Open311.
For mysociety/fixmystreet-commercial#1776
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 340351473..c73a90da1 100644 --- a/t/app/controller/admin/bodies.t +++ b/t/app/controller/admin/bodies.t @@ -250,6 +250,17 @@ subtest 'disable form message editing' => sub { }], 'right message added'; }; +subtest 'open311 protection editing' => sub { + $mech->get_ok('/admin/body/' . $body->id . '/test%20category'); + $mech->submit_form_ok( { with_fields => { + open311_protect => 1, + note => 'Protected from Open311 changes', + } } ); + $mech->content_contains('Values updated'); + my $contact = $body->contacts->find({ category => 'test category' }); + is $contact->get_extra_metadata('open311_protect'), 1, 'Open311 protect flag set'; +}; + }; # END of override wrap |