Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 19; |
20 |
use Test::More tests => 20; |
21 |
use Test::Mojo; |
21 |
use Test::Mojo; |
22 |
use t::lib::TestBuilder; |
22 |
use t::lib::TestBuilder; |
23 |
|
23 |
|
Lines 84-90
$t->request_ok($tx)
Link Here
|
84 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . ($borrower->{ borrowernumber }-1)); |
84 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . ($borrower->{ borrowernumber }-1)); |
85 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
85 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
86 |
$t->request_ok($tx) |
86 |
$t->request_ok($tx) |
87 |
->status_is(403); |
87 |
->status_is(403) |
|
|
88 |
->json_is('/required_permissions', {"borrowers" => "1"}); |
88 |
|
89 |
|
89 |
# User without permissions, but is the owner of the object |
90 |
# User without permissions, but is the owner of the object |
90 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . $borrower->{borrowernumber}); |
91 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . $borrower->{borrowernumber}); |
91 |
- |
|
|