Browse Source

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>
master
Nick Clemens 3 months ago
committed by Jonathan Druart
parent
commit
ba738eac1c
  1. 6
      t/db_dependent/api/v1/patrons.t

6
t/db_dependent/api/v1/patrons.t

@ -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);

Loading…
Cancel
Save