Lines 36-42
my $t = Test::Mojo->new('Koha::REST::V1');
Link Here
|
36 |
|
36 |
|
37 |
subtest 'list() and delete() tests | authorized user' => sub { |
37 |
subtest 'list() and delete() tests | authorized user' => sub { |
38 |
|
38 |
|
39 |
plan tests => 35; |
39 |
plan tests => 40; |
40 |
|
40 |
|
41 |
$schema->storage->txn_begin; |
41 |
$schema->storage->txn_begin; |
42 |
|
42 |
|
Lines 91-96
subtest 'list() and delete() tests | authorized user' => sub {
Link Here
|
91 |
->status_is(200) |
91 |
->status_is(200) |
92 |
->json_like( '/0/name' => qr/Amerindia/ ); |
92 |
->json_like( '/0/name' => qr/Amerindia/ ); |
93 |
|
93 |
|
|
|
94 |
my @aliases = ( { alias => 'alias 1' }, { alias => 'alias 2' } ); |
95 |
$vendor->aliases( \@aliases ); |
96 |
$t->get_ok( "//$userid:$password@/api/v1/acquisitions/vendors" => |
97 |
{ 'x-koha-embed' => 'aliases' } ) |
98 |
->status_is(200) |
99 |
->json_has('/0/aliases', 'aliases are embeded') |
100 |
->json_is('/0/aliases/0/alias' => 'alias 1', 'alias 1 is embeded') |
101 |
->json_is('/0/aliases/1/alias' => 'alias 2', 'alias 2 is embeded'); |
102 |
|
94 |
$t->delete_ok( "//$userid:$password@/api/v1/acquisitions/vendors/" . $vendor->id ) |
103 |
$t->delete_ok( "//$userid:$password@/api/v1/acquisitions/vendors/" . $vendor->id ) |
95 |
->status_is(204, 'SWAGGER3.2.4') |
104 |
->status_is(204, 'SWAGGER3.2.4') |
96 |
->content_is('', 'SWAGGER3.3.4'); |
105 |
->content_is('', 'SWAGGER3.3.4'); |
97 |
- |
|
|