Bug 34211: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b86ad81bbf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8326b64a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2023-07-06 14:08:13 +02:00 committed by Matt Blenkinsop
parent 62af3ce225
commit fa2b922934
1 changed files with 6 additions and 1 deletions

View File

@ -160,7 +160,7 @@ subtest 'get() tests' => sub {
subtest 'get_items() tests' => sub {
plan tests => 8;
plan tests => 11;
$schema->storage->txn_begin;
@ -192,6 +192,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;
};