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:
parent
1a398c5e9d
commit
bd0380c272
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue