Bugzilla – Attachment 154462 Details for
Bug 34313
Make password validation endpoint return patron IDs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34313: Unit tests
Bug-34313-Unit-tests.patch (text/plain), 2.24 KB, created by
Nick Clemens (kidclamp)
on 2023-08-16 11:27:50 UTC
(
hide
)
Description:
Bug 34313: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-08-16 11:27:50 UTC
Size:
2.24 KB
patch
obsolete
>From 633e5adca061c7686e67e2276f3b4fd9b169c1dc Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 19 Jul 2023 16:14:46 -0300 >Subject: [PATCH] Bug 34313: Unit tests > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/api/v1/password_validation.t | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/api/v1/password_validation.t b/t/db_dependent/api/v1/password_validation.t >index 21ef7fec838..c37c4ff14ee 100755 >--- a/t/db_dependent/api/v1/password_validation.t >+++ b/t/db_dependent/api/v1/password_validation.t >@@ -136,7 +136,9 @@ subtest 'Password validation - authorized requests tests' => sub { > }; > > $t->post_ok( "//$userid:$password@/api/v1/auth/password/validation" => json => $json ) >- ->status_is( 204, 'Validating using `cardnumber` works' )->content_is(q{}); >+ ->status_is( 201, 'Validating using `cardnumber` works' ) >+ ->json_is( >+ { cardnumber => $librarian->cardnumber, patron_id => $librarian->id, userid => $librarian->userid } ); > > $json = { > identifier => $librarian->cardnumber, >@@ -144,7 +146,9 @@ subtest 'Password validation - authorized requests tests' => sub { > }; > > $t->post_ok( "//$userid:$password@/api/v1/auth/password/validation" => json => $json ) >- ->status_is( 204, 'Validating using `cardnumber` works' )->content_is(q{}); >+ ->status_is( 201, 'Validating using `cardnumber` works' ) >+ ->json_is( >+ { cardnumber => $librarian->cardnumber, patron_id => $librarian->id, userid => $librarian->userid } ); > > $json = { > identifier => $deleted_cardnumber, >@@ -178,7 +182,9 @@ subtest 'Password validation - authorized requests tests' => sub { > }; > > $t->post_ok( "//$userid:$password@/api/v1/auth/password/validation" => json => $json ) >- ->status_is( 204, 'Validating using the `userid` attribute works' )->content_is(q{}); >+ ->status_is( 201, 'Validating using the `userid` attribute works' ) >+ ->json_is( >+ { cardnumber => $librarian->cardnumber, patron_id => $librarian->id, userid => $librarian->userid } ); > > $json = { > password => $password, >-- >2.30.2
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 34313
:
153685
|
153686
|
153690
|
153691
|
153787
|
153788
| 154462 |
154463