Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 74; |
20 |
use Test::More tests => 77; |
21 |
use Test::Mojo; |
21 |
use Test::Mojo; |
22 |
use t::lib::TestBuilder; |
22 |
use t::lib::TestBuilder; |
23 |
|
23 |
|
Lines 91-96
$t->request_ok($tx)
Link Here
|
91 |
->status_is(403) |
91 |
->status_is(403) |
92 |
->json_is('/required_permissions', {"borrowers" => "1"}); |
92 |
->json_is('/required_permissions', {"borrowers" => "1"}); |
93 |
|
93 |
|
|
|
94 |
$tx = $t->ua->build_tx(DELETE => "/api/v1/patrons/" . $patron->{ borrowernumber }); |
95 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
96 |
$t->request_ok($tx) |
97 |
->status_is(403) |
98 |
->json_is('/required_permissions', {"borrowers" => "1"}); |
99 |
|
94 |
# User without permissions, but is the owner of the object |
100 |
# User without permissions, but is the owner of the object |
95 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . $patron->{borrowernumber}); |
101 |
$tx = $t->ua->build_tx(GET => "/api/v1/patrons/" . $patron->{borrowernumber}); |
96 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
102 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
97 |
- |
|
|