Skip to content

Commit

Permalink
Add test to show no email is sent when final update made if email add…
Browse files Browse the repository at this point in the history
…ress not confirmed.
  • Loading branch information
dracos committed Mar 11, 2013
1 parent 1428e2b commit a97afd5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions t/cobrand/zurich.t
Expand Up @@ -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ä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', {
Expand Down

0 comments on commit a97afd5

Please sign in to comment.