diff options
Diffstat (limited to 't/app/controller/report_updates.t')
-rw-r--r-- | t/app/controller/report_updates.t | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 832e6cb82..58d9eff86 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -457,6 +457,8 @@ for my $test ( }, 'submit update' ); + $mech->content_contains("/report/$report_id"); + $mech->get_ok("/report/$report_id"); $mech->content_contains('Test 2'); $mech->content_contains('Update no email confirm'); @@ -690,6 +692,7 @@ for my $test ( }, 'submit update' ); + $mech->get_ok("/report/$report_id"); $report->discard_changes; my $update = $report->comments->first; @@ -816,6 +819,7 @@ subtest "check comment with no status change has not status in meta" => sub { }, 'submit update' ); + $mech->get_ok("/report/$report_id"); $report->discard_changes; @updates = $report->comments->search(undef, { order_by => 'created' })->all;; @@ -971,7 +975,7 @@ for my $test ( "submit good details" ); - is $mech->uri->path, "/report/" . $report_id, "redirected to report page"; + $mech->content_contains('Thank you for updating this issue'); $mech->email_count_is(0); my $update = $report->comments->first; @@ -1201,7 +1205,9 @@ for my $test ( 'submit update' ); - is $mech->uri->path, "/report/" . $report_id, "redirected to report page"; + $mech->content_contains('Thank you for updating this issue'); + $mech->content_contains("/report/" . $report_id); + $mech->get_ok("/report/" . $report_id); if ( !defined( $test->{endstate_banner} ) ) { is $mech->extract_problem_banner->{text}, undef, 'endstate banner'; @@ -1255,7 +1261,6 @@ foreach my $test ( alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, answered => 0, - path => '/report/update', content => "Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?", }, @@ -1282,7 +1287,6 @@ foreach my $test ( alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, answered => 0, - path => '/report/update', content => "Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?", }, @@ -1310,7 +1314,6 @@ foreach my $test ( alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, answered => 1, - path => '/report/' . $report->id, content => $report->title, }, ) @@ -1363,7 +1366,7 @@ foreach my $test ( $mech->submit_form_ok( { with_fields => $test->{fields}, }, 'submit update' ); - is $mech->uri->path, $test->{path}, "page after submission"; + is $mech->uri->path, '/report/update', "page after submission"; $mech->content_contains( $test->{content} ); @@ -1393,6 +1396,7 @@ foreach my $test ( $mech->submit_form_ok( { with_fields => { reported => 'Yes' } } ); + $mech->content_contains( $report->title ); $mech->content_contains( 'Thank you for updating this issue' ); $questionnaire = FixMyStreet::App->model( 'DB::Questionnaire' )->find( @@ -1542,6 +1546,7 @@ for my $test ( $mech->submit_form_ok( { with_fields => { reported => 'Yes' } } ); + $mech->content_contains( $report->title ); $mech->content_contains( 'Thank you for updating this issue' ); $questionnaire = FixMyStreet::App->model( 'DB::Questionnaire' )->find( |