Bug 32801: Add tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b157a2cd7f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
26e4866c9d
commit
4041d06124
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 99;
|
||||
use Test::More tests => 103;
|
||||
use Test::MockModule;
|
||||
use Test::Mojo;
|
||||
use t::lib::Mocks;
|
||||
|
|
@ -125,6 +125,12 @@ $t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id&checked_
|
|||
->json_is('/0/item_id' => $item4->itemnumber)
|
||||
->json_hasnt('/1');
|
||||
|
||||
$item4->delete;
|
||||
$t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id&checked_in=1" )
|
||||
->status_is(200)
|
||||
->json_is('/0/patron_id' => $patron_id)
|
||||
->json_is('/0/item_id' => undef);
|
||||
|
||||
$t->get_ok( "//$unauth_userid:$unauth_password@/api/v1/checkouts/" . $issue3->issue_id )
|
||||
->status_is(403)
|
||||
->json_is({ error => "Authorization failure. Missing required permission(s).",
|
||||
|
|
|
|||
Loading…
Reference in New Issue