diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-08 13:53:16 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-09 16:36:06 +0100 |
commit | a86124e579dd23d04a3539358cc3b9c77f474b11 (patch) | |
tree | 62b235e8d7042c38bd3794e9d5c695bcbcd37b1e /t/app/controller/admin_permissions.t | |
parent | b09ed851c874ac9abd8fb94d9ef995e828a628da (diff) |
Add new category_edit restriction for viewing body admin.
Diffstat (limited to 't/app/controller/admin_permissions.t')
-rw-r--r-- | t/app/controller/admin_permissions.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/app/controller/admin_permissions.t b/t/app/controller/admin_permissions.t index 2c271ba4c..4b05660cc 100644 --- a/t/app/controller/admin_permissions.t +++ b/t/app/controller/admin_permissions.t @@ -47,7 +47,7 @@ subtest "Users can't edit report without report_edit permission" => sub { }, sub { $mech->get("/admin/report_edit/$report_id"); ok !$mech->res->is_success(), "want a bad response"; - is $mech->res->code, 403, "got 403, can't edit report without report_edit permission"; + is $mech->res->code, 404, "got 404, can't edit report without report_edit permission"; }; }; @@ -100,7 +100,7 @@ FixMyStreet::override_config { $report->update({ user => $report_user }); foreach my $from_body (undef, $bromley, $oxfordshire) { $user2->update({ from_body => $from_body }); - my $result = ($from_body || '') eq $oxfordshire || $report->user eq $user2 ? ($perm ? 200 : 403 ) : 404; + my $result = ($from_body || '') eq $oxfordshire || $report->user eq $user2 ? ($perm ? 200 : 404 ) : 404; my $u = $result == 200 ? 'can' : 'cannot'; my $b = $from_body ? $from_body->name : 'no body'; my $p = $perm ? 'with' : 'without'; |