|
Lines 294-299
get '/stash_overrides' => sub {
Link Here
|
| 294 |
); |
294 |
); |
| 295 |
}; |
295 |
}; |
| 296 |
|
296 |
|
|
|
297 |
get '/stash_request_id' => sub { |
| 298 |
my $c = shift; |
| 299 |
|
| 300 |
$c->stash_request_id(); |
| 301 |
my $request_id = $c->stash('koha.request_id'); |
| 302 |
|
| 303 |
$c->render( |
| 304 |
status => 200, |
| 305 |
json => $request_id |
| 306 |
); |
| 307 |
}; |
| 308 |
|
| 297 |
get '/dbic_extended_attributes_join' => sub { |
309 |
get '/dbic_extended_attributes_join' => sub { |
| 298 |
my ( $c, $args ) = @_; |
310 |
my ( $c, $args ) = @_; |
| 299 |
|
311 |
|
|
Lines 370-376
sub to_model {
Link Here
|
| 370 |
# The tests |
382 |
# The tests |
| 371 |
|
383 |
|
| 372 |
use Test::NoWarnings; |
384 |
use Test::NoWarnings; |
| 373 |
use Test::More tests => 11; |
385 |
use Test::More tests => 12; |
| 374 |
use Test::Mojo; |
386 |
use Test::Mojo; |
| 375 |
|
387 |
|
| 376 |
subtest 'extract_reserved_params() tests' => sub { |
388 |
subtest 'extract_reserved_params() tests' => sub { |
|
Lines 589-594
subtest 'stash_overrides() tests' => sub {
Link Here
|
| 589 |
|
601 |
|
| 590 |
}; |
602 |
}; |
| 591 |
|
603 |
|
|
|
604 |
subtest 'stash_request_id() tests' => sub { |
| 605 |
|
| 606 |
plan tests => 6; |
| 607 |
|
| 608 |
my $t = Test::Mojo->new; |
| 609 |
|
| 610 |
$t->get_ok( '/stash_request_id' => { 'x-koha-request-id' => '123456789' } )->json_is('123456789'); |
| 611 |
|
| 612 |
$t->get_ok( '/stash_request_id' => { 'x-koha-request-id' => '' } )->json_is(q{}); |
| 613 |
|
| 614 |
$t->get_ok( '/stash_request_id' => {} )->json_is(q{}); |
| 615 |
|
| 616 |
}; |
| 617 |
|
| 592 |
subtest 'dbic_extended_attributes_join() tests' => sub { |
618 |
subtest 'dbic_extended_attributes_join() tests' => sub { |
| 593 |
|
619 |
|
| 594 |
plan tests => 4; |
620 |
plan tests => 4; |
| 595 |
- |
|
|