aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_display.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r--t/app/controller/report_display.t32
1 files changed, 0 insertions, 32 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 48a827a63..4bd0fc991 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -73,38 +73,6 @@ subtest "change report to hidden and check for 410 status" => sub {
ok $report->update( { state => 'confirmed' } ), 'confirm report again';
};
-subtest "change report to non_public and check for 403 status" => sub {
- ok $report->update( { non_public => 1 } ), 'make report non public';
- ok $mech->get("/report/$report_id"), "get '/report/$report_id'";
- is $mech->res->code, 403, "access denied";
- is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
- $mech->content_contains('permission to do that. If you are the problem reporter');
- $mech->content_lacks('Report another problem here');
- $mech->content_lacks($report->latitude);
- $mech->content_lacks($report->longitude);
- ok $report->update( { non_public => 0 } ), 'make report public';
-};
-
-subtest "check owner of report can view non public reports" => sub {
- ok $report->update( { non_public => 1 } ), 'make report non public';
- $mech->log_in_ok( $report->user->email );
- ok $mech->get("/report/$report_id"), "get '/report/$report_id'";
- is $mech->res->code, 200, "report can be viewed";
- is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
- $mech->log_out_ok;
-
- $mech->log_in_ok( $user2->email );
- ok $mech->get("/report/$report_id"), "get '/report/$report_id'";
- is $mech->res->code, 403, "access denied to user who is not report creator";
- is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
- $mech->content_contains('permission to do that. If you are the problem reporter');
- $mech->content_lacks('Report another problem here');
- $mech->content_lacks($report->latitude);
- $mech->content_lacks($report->longitude);
- $mech->log_out_ok;
- ok $report->update( { non_public => 0 } ), 'make report public';
-};
-
subtest "duplicate reports are signposted correctly" => sub {
$report2->set_extra_metadata(duplicate_of => $report->id);
$report2->state('duplicate');