Bug 34211: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-07-06 14:08:13 +02:00 committed by Tomas Cohen Arazi
parent 2c73648f77
commit b86ad81bbf
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,7 @@ subtest 'get() tests' => sub {
subtest 'get_items() tests' => sub {
plan tests => 8;
plan tests => 11;
$schema->storage->txn_begin;
@ -196,6 +196,11 @@ subtest 'get_items() tests' => sub {
->status_is(200)
->json_is( '' => [ $item_1->to_api, $item_2->to_api ], 'The items are returned' );
$t->get_ok(
"//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items" => { "x-koha-embed" => "+strings" } )
->status_is(200)
->json_has( '/0/_strings/home_library_id/str' => $item_1->holding_branch->branchname, '_strings are embedded' );
$schema->storage->txn_rollback;
};