aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-24 15:32:40 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-24 15:35:03 +0100
commitea1ccfd71b085a8d9a06bdb7b8064093acd5ebbe (patch)
tree2dd6ba81c144de247c50caa67de1bab8450d65cb /t/app/controller
parentf70ef9f6a612d3387db24519e163e6b326a9fb64 (diff)
Disable staff private tickbox if category private.
If a category is marked private, new reports are always marked private regardless of the setting of the private checkbox shown to relevant staff when making a new report. So tick/disable this box in that situation to prevent any confusion.
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/report_new_staff.t8
1 files changed, 8 insertions, 0 deletions
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 => {