diff options
author | Chris Mytton <self@hecticjeff.net> | 2013-09-12 10:01:04 +0100 |
---|---|---|
committer | Chris Mytton <self@hecticjeff.net> | 2013-09-12 10:01:04 +0100 |
commit | 0de03c9643f5deba3ecf2abb1bb961a5faa8a298 (patch) | |
tree | 4db913b9caf5f91eb9acdae50e474d8ffb7eb240 /t | |
parent | 2b85ab1153a5dba9b5bb671144115a7f548dc6b3 (diff) | |
parent | 1f5c75fde567bccca3d51ad57bc8f01274e8d114 (diff) |
Merge branch 'zurich-optional-problem-rejected-email'
Conflicts:
t/cobrand/zurich.t
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' ); |