Bug 34054: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-06-19 09:49:08 +02:00 committed by Tomas Cohen Arazi
parent 1a398c5e9d
commit bd0380c272
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -42,7 +42,7 @@ my $t = Test::Mojo->new('Koha::REST::V1');
subtest 'list() tests' => sub {
plan tests => 12;
plan tests => 15;
$schema->storage->txn_begin;
@ -91,6 +91,11 @@ subtest 'list() tests' => sub {
->status_is(200)
->json_is( '' => [ $item->to_api ], 'SWAGGER3.3.2');
$t->get_ok( "//$userid:$password@/api/v1/items?external_id=" . $item->barcode => {'x-koha-embed' => 'biblio'} )
->status_is(200)
->json_is( '' => [ { %{$item->to_api}, biblio => $item->biblio->to_api } ], 'SWAGGER3.3.2');
my $barcode = $item->barcode;
$item->delete;