aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_updates.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-05-01 15:42:01 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-05-07 10:54:25 +0100
commitf6d807fd5217a19ac488f652d1f0853a7891231f (patch)
tree2e8fc2f6496a1253339c9609008d09563877e614 /t/app/controller/report_updates.t
parentab0d1dc84b1ed7a1c572e986eda3a4bdc5157d77 (diff)
Add way to disallow report reopening in a category
Add a tickbox to the category admin, and do not allow reopening on reports made in the selected categories.
Diffstat (limited to 't/app/controller/report_updates.t')
-rw-r--r--t/app/controller/report_updates.t11
1 files changed, 11 insertions, 0 deletions
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();