aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/admin/bodies.t11
-rw-r--r--t/app/controller/report_updates.t11
2 files changed, 22 insertions, 0 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index 7ec7aed75..d3e4074f9 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -272,6 +272,17 @@ subtest 'updates disabling' => sub {
is $contact->get_extra_metadata('updates_disallowed'), 1, 'Updates disallowed flag set';
};
+subtest 'reopen disabling' => sub {
+ $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
+ $mech->submit_form_ok( { with_fields => {
+ reopening_disallowed => 1,
+ note => 'Disabling reopening',
+ } } );
+ $mech->content_contains('Values updated');
+ my $contact = $body->contacts->find({ category => 'test category' });
+ is $contact->get_extra_metadata('reopening_disallowed'), 1, 'Reopening disallowed flag set';
+};
+
}; # END of override wrap
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index e8ab1cc85..e97b04f12 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -2145,6 +2145,17 @@ for my $test (
};
}
+subtest 'check disabling of reopening' => sub {
+ $report->state('fixed - council');
+ $report->update;
+ $mech->get_ok("/report/$report_id");
+ $mech->content_contains('This problem has not been fixed');
+ $contact->set_extra_metadata( reopening_disallowed => 1 );
+ $contact->update;
+ $mech->get_ok("/report/$report_id");
+ $mech->content_lacks('This problem has not been fixed');
+};
+
subtest 'check have to be logged in for creator fixed questionnaire' => sub {
$mech->log_out_ok();