aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin/bodies.t11
-rw-r--r--t/app/controller/report_new_staff.t8
2 files changed, 19 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
diff --git a/t/app/controller/report_new_staff.t b/t/app/controller/report_new_staff.t
index 422b154ed..3817cdf3a 100644
--- a/t/app/controller/report_new_staff.t
+++ b/t/app/controller/report_new_staff.t
@@ -45,6 +45,14 @@ subtest "report_mark_private allows users to mark reports as private" => sub {
"follow 'skip this step' link"
);
+ my $edin_cats = $mech->create_contact_ok( body_id => $body_ids{2651}, category => 'Cats', email => 'cats@example.com', non_public => 1 );
+ $mech->submit_form_ok({
+ button => 'submit_category_part_only',
+ with_fields => { category => 'Cats' }
+ });
+ $mech->content_contains('id="form_non_public" value="1" checked disabled');
+ $edin_cats->delete;
+
$mech->submit_form_ok(
{
with_fields => {