|
Lines 42-48
my $t = Test::Mojo->new('Koha::REST::V1');
Link Here
|
| 42 |
|
42 |
|
| 43 |
subtest 'list() tests' => sub { |
43 |
subtest 'list() tests' => sub { |
| 44 |
|
44 |
|
| 45 |
plan tests => 12; |
45 |
plan tests => 15; |
| 46 |
|
46 |
|
| 47 |
$schema->storage->txn_begin; |
47 |
$schema->storage->txn_begin; |
| 48 |
|
48 |
|
|
Lines 91-96
subtest 'list() tests' => sub {
Link Here
|
| 91 |
->status_is(200) |
91 |
->status_is(200) |
| 92 |
->json_is( '' => [ $item->to_api ], 'SWAGGER3.3.2'); |
92 |
->json_is( '' => [ $item->to_api ], 'SWAGGER3.3.2'); |
| 93 |
|
93 |
|
|
|
94 |
$t->get_ok( "//$userid:$password@/api/v1/items?external_id=" . $item->barcode => {'x-koha-embed' => 'biblio'} ) |
| 95 |
->status_is(200) |
| 96 |
->json_is( '' => [ { %{$item->to_api}, biblio => $item->biblio->to_api } ], 'SWAGGER3.3.2'); |
| 97 |
|
| 98 |
|
| 94 |
my $barcode = $item->barcode; |
99 |
my $barcode = $item->barcode; |
| 95 |
$item->delete; |
100 |
$item->delete; |
| 96 |
|
101 |
|
| 97 |
- |
|
|