From bd0380c272e83f7da60f24ab7205a65a693cab7d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 19 Jun 2023 09:49:08 +0200 Subject: [PATCH] Bug 34054: Add tests Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Andreas Roussos Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/api/v1/items.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/items.t b/t/db_dependent/api/v1/items.t index a4a6300652..6a22356254 100755 --- a/t/db_dependent/api/v1/items.t +++ b/t/db_dependent/api/v1/items.t @@ -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; -- 2.39.5