Bugzilla – Attachment 184179 Details for
Bug 40423
Handling x-koha-request-id relies on wrong data structure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40423: Unit tests
Bug-40423-Unit-tests.patch (text/plain), 1.55 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-07-17 02:56:18 UTC
(
hide
)
Description:
Bug 40423: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-07-17 02:56:18 UTC
Size:
1.55 KB
patch
obsolete
>From 00088e754f8de3c1bdabc1a2f9905ca615015b67 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 16 Jul 2025 23:31:45 -0300 >Subject: [PATCH] Bug 40423: Unit tests > >--- > t/Koha/REST/Plugin/Query.t | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > >diff --git a/t/Koha/REST/Plugin/Query.t b/t/Koha/REST/Plugin/Query.t >index 057314914fa..23f63d3d697 100755 >--- a/t/Koha/REST/Plugin/Query.t >+++ b/t/Koha/REST/Plugin/Query.t >@@ -294,6 +294,18 @@ get '/stash_overrides' => sub { > ); > }; > >+get '/stash_request_id' => sub { >+ my $c = shift; >+ >+ $c->stash_request_id(); >+ my $request_id = $c->stash('koha.request_id'); >+ >+ $c->render( >+ status => 200, >+ json => $request_id >+ ); >+}; >+ > get '/dbic_extended_attributes_join' => sub { > my ( $c, $args ) = @_; > >@@ -370,7 +382,7 @@ sub to_model { > # The tests > > use Test::NoWarnings; >-use Test::More tests => 11; >+use Test::More tests => 12; > use Test::Mojo; > > subtest 'extract_reserved_params() tests' => sub { >@@ -589,6 +601,20 @@ subtest 'stash_overrides() tests' => sub { > > }; > >+subtest 'stash_request_id() tests' => sub { >+ >+ plan tests => 6; >+ >+ my $t = Test::Mojo->new; >+ >+ $t->get_ok( '/stash_request_id' => { 'x-koha-request-id' => '123456789' } )->json_is('123456789'); >+ >+ $t->get_ok( '/stash_request_id' => { 'x-koha-request-id' => '' } )->json_is(q{}); >+ >+ $t->get_ok( '/stash_request_id' => {} )->json_is(q{}); >+ >+}; >+ > subtest 'dbic_extended_attributes_join() tests' => sub { > > plan tests => 4; >-- >2.50.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40423
:
184179
|
184180
|
184216
|
184217
|
184552
|
184553