diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-23 12:20:19 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-07-31 22:13:41 +0100 |
commit | 7e3742d37dbdab4e5be39230e4738457fecb34a4 (patch) | |
tree | 8a67d1095760120435f93df84fc079f7f76ae6be /t | |
parent | 8faf42a8d77f5e95840ed633bd21c32923ab2c51 (diff) |
[Zurich] Show internal reports on their own page.
The new internal reports is displayed the same as the main summary, and
all reports shows both internal/non-internal.
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/zurich.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 97ac19761..ce38f65d4 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -769,12 +769,20 @@ subtest "phone number is mandatory" => sub { $mech->content_contains( 'Diese Information wird benötigt' ); }; +my $internal; subtest 'test flagged users make internal reports' => sub { $user->update({ flagged => 1 }); $mech->submit_form( with_fields => { phone => "01234", category => 'Cat1', detail => 'Details' } ); - my $report = FixMyStreet::DB->resultset('Problem')->search(undef, { order_by => { -desc => 'id' }, rows => 1 })->single; - is $report->non_public, 1; - $report->delete; + $internal = FixMyStreet::DB->resultset('Problem')->search(undef, { order_by => { -desc => 'id' }, rows => 1 })->single; + is $internal->non_public, 1; +}; + +subtest 'internal report admin display' => sub { + $mech->get_ok('/admin/summary'); + $mech->content_lacks('href="report_edit/' . $internal->id); + $mech->get_ok('/admin/summary?internal=1'); + $mech->content_contains('href="report_edit/' . $internal->id); + $internal->delete; $mech->log_out_ok; }; |