Lines 433-439
subtest '_build_query_params_from_api' => sub {
Link Here
|
433 |
|
433 |
|
434 |
subtest 'stash_embed() tests' => sub { |
434 |
subtest 'stash_embed() tests' => sub { |
435 |
|
435 |
|
436 |
plan tests => 14; |
436 |
plan tests => 16; |
437 |
|
437 |
|
438 |
my $t = Test::Mojo->new; |
438 |
my $t = Test::Mojo->new; |
439 |
|
439 |
|
Lines 446-451
subtest 'stash_embed() tests' => sub {
Link Here
|
446 |
$t->get_ok( '/stash_embed' => { 'x-koha-embed' => 'holds+count' } ) |
446 |
$t->get_ok( '/stash_embed' => { 'x-koha-embed' => 'holds+count' } ) |
447 |
->json_is( '/embed' => { holds_count => { is_count => 1 } } ); |
447 |
->json_is( '/embed' => { holds_count => { is_count => 1 } } ); |
448 |
|
448 |
|
|
|
449 |
$t->get_ok( '/stash_embed' => { 'x-koha-embed' => 'holds:count' } ) |
450 |
->json_is( '/embed' => { holds_count => { is_count => 1 } } ); |
451 |
|
449 |
$t->get_ok( '/stash_embed' => { 'x-koha-embed' => 'checkouts,checkouts.item,patron' } ) |
452 |
$t->get_ok( '/stash_embed' => { 'x-koha-embed' => 'checkouts,checkouts.item,patron' } ) |
450 |
->json_is( '/embed' => { |
453 |
->json_is( '/embed' => { |
451 |
checkouts => { children => { item => {} } }, |
454 |
checkouts => { children => { item => {} } }, |
452 |
- |
|
|