diff options
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/auth.t | 2 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t index 67466e959..8d7bfbf4d 100644 --- a/t/app/controller/auth.t +++ b/t/app/controller/auth.t @@ -95,7 +95,7 @@ $mech->not_logged_in_ok; $mech->log_out_ok; $mech->get_ok($link); is $mech->uri, $link, "not logged in"; - $mech->content_contains( 'Link too old or already used', + $mech->content_contains( 'too old or already used', 'token now invalid' ); $mech->not_logged_in_ok; } diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 71c904ed9..ac0cc52b3 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -19,6 +19,8 @@ $mech->content_like( qr/zurich/i ); # Set up bodies my $zurich = $mech->create_body_ok( 1, 'Zurich' ); +$zurich->parent( undef ); +$zurich->update; my $division = $mech->create_body_ok( 2, 'Division 1' ); $division->parent( $zurich->id ); $division->send_method( 'Zurich' ); @@ -169,6 +171,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', { |