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 => 40; |
39 |
plan tests => 44; |
40 |
|
40 |
|
41 |
$schema->storage->txn_begin; |
41 |
$schema->storage->txn_begin; |
42 |
|
42 |
|
Lines 100-105
subtest 'list() and delete() tests | authorized user' => sub {
Link Here
|
100 |
->json_is('/0/aliases/0/alias' => 'alias 1', 'alias 1 is 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'); |
101 |
->json_is('/0/aliases/1/alias' => 'alias 2', 'alias 2 is embeded'); |
102 |
|
102 |
|
|
|
103 |
for ( 0 .. 1 ) { |
104 |
$builder->build_object( { class => 'Koha::Subscriptions', value => { aqbooksellerid => $vendor->id } } ); |
105 |
} |
106 |
$t->get_ok( "//$userid:$password@/api/v1/acquisitions/vendors" => { 'x-koha-embed' => 'subscriptions+count' } ) |
107 |
->status_is(200)->json_has( '/0/subscriptions_count', 'subscriptions_count is embeded' ) |
108 |
->json_is( '/0/subscriptions_count' => '2', 'subscription count is 2' ); |
109 |
|
103 |
$t->delete_ok( "//$userid:$password@/api/v1/acquisitions/vendors/" . $vendor->id ) |
110 |
$t->delete_ok( "//$userid:$password@/api/v1/acquisitions/vendors/" . $vendor->id ) |
104 |
->status_is(204, 'SWAGGER3.2.4') |
111 |
->status_is(204, 'SWAGGER3.2.4') |
105 |
->content_is('', 'SWAGGER3.3.4'); |
112 |
->content_is('', 'SWAGGER3.3.4'); |
106 |
- |
|
|