aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/zurich.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-01-24 14:20:29 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-07-31 22:13:41 +0100
commit8fd5db0cb1e873895564486f32d918de385d2f12 (patch)
tree69766be2e75a421293847c5f5009d4b02f1ffdd7 /t/cobrand/zurich.t
parent7e3742d37dbdab4e5be39230e4738457fecb34a4 (diff)
[Zurich] No admin emails on internal reports.
Diffstat (limited to 't/cobrand/zurich.t')
-rw-r--r--t/cobrand/zurich.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index ce38f65d4..fb2c08550 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -775,6 +775,7 @@ subtest 'test flagged users make internal reports' => sub {
$mech->submit_form( with_fields => { phone => "01234", category => 'Cat1', detail => 'Details' } );
$internal = FixMyStreet::DB->resultset('Problem')->search(undef, { order_by => { -desc => 'id' }, rows => 1 })->single;
is $internal->non_public, 1;
+ $mech->clear_emails_ok;
};
subtest 'internal report admin display' => sub {
@@ -782,6 +783,24 @@ subtest 'internal report admin display' => sub {
$mech->content_lacks('href="report_edit/' . $internal->id);
$mech->get_ok('/admin/summary?internal=1');
$mech->content_contains('href="report_edit/' . $internal->id);
+};
+
+subtest 'test no email sent if closed' => sub {
+ $internal->state('feedback pending');
+ $internal->set_extra_metadata('email_confirmed' => 1);
+ $internal->update;
+
+ $mech->get_ok( '/admin/report_edit/' . $internal->id );
+ $mech->submit_form_ok( {
+ button => 'publish_response',
+ with_fields => {
+ status_update => 'Testing no email sent',
+ } });
+
+ $internal->discard_changes;
+ is $internal->state, 'fixed - council';
+ $mech->email_count_is(0);
+
$internal->delete;
$mech->log_out_ok;
};