aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-03-11 19:26:26 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-03-11 19:26:26 +0000
commita97afd505735a9ac44482f10d44eefe855c75970 (patch)
treebb0879d14ccd25d30a9e40eeb467df5fcced9401
parent1428e2b2de67f3d45b9eb32247a0594516ede4d2 (diff)
Add test to show no email is sent when final update made if email address not confirmed.
-rw-r--r--t/cobrand/zurich.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 71c904ed9..c750b6070 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -169,6 +169,31 @@ like $email->header('From'), qr/division\@example.org/, 'from line looks correct
like $email->body, qr/FINAL UPDATE/, 'body looks correct';
$mech->clear_emails_ok;
+# Assign directly to planned, don't confirm email
+@reports = $mech->create_problems_for_body( 1, 2, 'Second', {
+ state => 'unconfirmed',
+ confirmed => undef,
+ cobrand => 'zurich',
+});
+$report = $reports[0];
+
+$mech->get_ok( '/admin/report_edit/' . $report->id );
+$mech->submit_form_ok( { with_fields => { state => 'planned' } } );
+$mech->get_ok( '/report/' . $report->id );
+$mech->content_contains('In Bearbeitung');
+$mech->content_contains('Second Test');
+
+$mech->get_ok( '/admin/report_edit/' . $report->id );
+$mech->content_contains( 'Unbest&auml;tigt' );
+$mech->submit_form_ok( { button => 'publish_response', with_fields => { status_update => 'FINAL UPDATE' } } );
+
+$mech->get_ok( '/report/' . $report->id );
+$mech->content_contains('Erledigt');
+$mech->content_contains('Second Test');
+$mech->content_contains('FINAL UPDATE');
+
+$mech->email_count_is(0);
+
# Report assigned to third party
@reports = $mech->create_problems_for_body( 1, 2, 'Third', {