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> (cherry picked from commitbd0380c272
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit66a790e6cd
) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
This commit is contained in:
parent
bd8272bebb
commit
1cb9b17325
1 changed files with 6 additions and 1 deletions
|
@ -39,7 +39,7 @@ my $t = Test::Mojo->new('Koha::REST::V1');
|
|||
|
||||
subtest 'list() tests' => sub {
|
||||
|
||||
plan tests => 12;
|
||||
plan tests => 15;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
@ -88,6 +88,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