aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_inspect.t
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2016-10-03 09:49:08 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-10-04 10:37:52 +0100
commitd8fd656009fe6b9868ae366c0d6b0d9f6cbf2272 (patch)
tree8f42b5c6f43dec530547391c92017d1fe1e97882 /t/app/controller/report_inspect.t
parenta9193cd34159cd1a133c5a79a5f49b26ce704df6 (diff)
Remove separate “Public update” form section
Inspectors can now tick the optional “Save with a public update” checkbox, to reveal the “Public update” textarea. This means there is no longer a need for two separate submit buttons.
Diffstat (limited to 't/app/controller/report_inspect.t')
-rw-r--r--t/app/controller/report_inspect.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t
index 690a01ca1..4caeef501 100644
--- a/t/app/controller/report_inspect.t
+++ b/t/app/controller/report_inspect.t
@@ -56,7 +56,7 @@ FixMyStreet::override_config {
$report->unset_extra_metadata('inspected');
$report->update;
$mech->get_ok("/report/$report_id/inspect");
- $mech->submit_form_ok({ button => 'save_inspected', with_fields => { public_update => "This is a public update." } });
+ $mech->submit_form_ok({ button => 'save', with_fields => { public_update => "This is a public update.", save_inspected => "1" } });
$report->discard_changes;
is $report->comments->first->text, "This is a public update.", 'Update was created';
is $report->get_extra_metadata('inspected'), 1, 'report marked as inspected';
@@ -67,7 +67,7 @@ FixMyStreet::override_config {
$report->update;
$report->comments->delete_all;
$mech->get_ok("/report/$report_id/inspect");
- $mech->submit_form_ok({ button => 'save_inspected', with_fields => { public_update => undef } });
+ $mech->submit_form_ok({ button => 'save', with_fields => { public_update => undef, save_inspected => "1" } });
is_deeply $mech->page_errors, [ "Please provide a public update for this report." ], 'errors match';
$report->discard_changes;
is $report->comments->count, 0, "Update wasn't created";