Bug 28480: (QA follow-up) Add unit test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2021-06-11 18:02:11 +00:00 committed by Jonathan Druart
parent 0efdb1bb7a
commit ba738eac1c
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,7 @@ subtest 'list() tests' => sub {
$schema->storage->txn_rollback;
subtest 'librarian access tests' => sub {
plan tests => 13;
plan tests => 16;
$schema->storage->txn_begin;
@ -67,6 +67,10 @@ subtest 'list() tests' => sub {
->status_is(200)
->json_is('/0/cardnumber' => $librarian->cardnumber);
$t->get_ok("//$userid:$password@/api/v1/patrons?q={\"cardnumber\":\"" . $librarian->cardnumber ."\"}")
->status_is(200)
->json_is('/0/cardnumber' => $librarian->cardnumber);
$t->get_ok("//$userid:$password@/api/v1/patrons?address2=" . $librarian->address2)
->status_is(200)
->json_is('/0/address2' => $librarian->address2);