Bugzilla – Attachment 182831 Details for
Bug 40023
Allow embedding `patron` when validating credentials
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40023: Unit tests
Bug-40023-Unit-tests.patch (text/plain), 1.42 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-05-28 19:24:53 UTC
(
hide
)
Description:
Bug 40023: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-05-28 19:24:53 UTC
Size:
1.42 KB
patch
obsolete
>From d9f04373c740aac77b2c04a9458010a4a76371fb Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 28 May 2025 16:18:58 -0300 >Subject: [PATCH] Bug 40023: Unit tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/api/v1/password_validation.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/password_validation.t b/t/db_dependent/api/v1/password_validation.t >index 74b025d96db..d1fc214c7a9 100755 >--- a/t/db_dependent/api/v1/password_validation.t >+++ b/t/db_dependent/api/v1/password_validation.t >@@ -116,7 +116,7 @@ subtest 'password validation - unauthenticated user' => sub { > > subtest 'Password validation - authorized requests tests' => sub { > >- plan tests => 24; >+ plan tests => 27; > > $schema->storage->txn_begin; > >@@ -184,6 +184,11 @@ subtest 'Password validation - authorized requests tests' => sub { > ->json_is( > { cardnumber => $librarian->cardnumber, patron_id => $librarian->id, userid => $librarian->userid } ); > >+ $t->post_ok( >+ "//$userid:$password@/api/v1/auth/password/validation" => { 'x-koha-embed' => 'patron' } => json => $json ) >+ ->status_is( 201, 'Validating using the `userid` attribute works, x-koha-embed too' ) >+ ->json_is( '/patron/patron_id' => $librarian->id ); >+ > $json = { > password => $password, > userid => $librarian->cardnumber, >-- >2.49.0
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 40023
: 182831 |
182832