diff options
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/admin/report_edit.t | 4 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/t/app/controller/admin/report_edit.t b/t/app/controller/admin/report_edit.t index a8a0bd143..e61f781f5 100644 --- a/t/app/controller/admin/report_edit.t +++ b/t/app/controller/admin/report_edit.t @@ -364,6 +364,10 @@ foreach my $test ( $mech->content_lacks( 'type="submit" name="resend"', 'no resend button' ); } + if ($report->state eq 'fixed') { + $mech->content_contains('pin-green'); + } + $test->{changes}->{flagged} = 1 if $test->{changes}->{flagged}; $test->{changes}->{non_public} = 1 if $test->{changes}->{non_public}; diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 5c1ff9a0e..4ae9a0cde 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -269,7 +269,7 @@ subtest "report_edit" => sub { $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->submit_form_ok( { with_fields => { state => 'hidden' } } ); - $mech->get_ok( '/admin/report_edit/' . $report->id ); + $mech->get_ok( '/report/' . $report->id, 'still visible as response not published yet' ); $report->discard_changes; is ( $report->get_extra_metadata('moderated_overdue'), 0, 'Still marked moderated_overdue' ); @@ -280,6 +280,7 @@ subtest "report_edit" => sub { or diag $report->get_column('extra'); # publishing actually sets hidden + $mech->get_ok( '/admin/report_edit/' . $report->id ); $mech->form_with_fields( 'status_update' ); $mech->submit_form_ok( { button => 'publish_response' } ); $mech->get_ok( '/admin/report_edit/' . $report->id ); @@ -293,6 +294,9 @@ subtest "report_edit" => sub { $report->discard_changes; is ( $report->state, 'hidden', 'Another internal note does not reopen'); + $mech->get( '/report/' . $report->id); + is $mech->res->code, 410; + reset_report_state($report); is ( $report->get_extra_metadata('moderated_overdue'), undef, 'Sanity check' ); is get_moderated_count(), 0; |