diff options
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/zurich.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 035cdafe0..6039017e9 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -367,6 +367,22 @@ $user->from_body( 2 ); $user->update; $mech->log_out_ok; +# Test hidden report email are only sent when requested +$user = $mech->log_in_ok( 'dm1@example.org') ; +$extra = $report->extra; +$extra->{email_confirmed} = 1; +$report->extra ( { %$extra } ); +$report->update; +$mech->get_ok( '/admin/report_edit/' . $report->id ); +$mech->submit_form_ok( { with_fields => { state => 'hidden', send_rejected_email => 1 } } ); +$mech->email_count_is(1); +$mech->clear_emails_ok; +$mech->get_ok( '/admin/report_edit/' . $report->id ); +$mech->submit_form_ok( { with_fields => { state => 'hidden', send_rejected_email => undef } } ); +$mech->email_count_is(0); +$mech->clear_emails_ok; +$mech->log_out_ok; + $mech->delete_problems_for_body( 2 ); $mech->delete_user( 'dm1@example.org' ); $mech->delete_user( 'sdm1@example.org' ); |