Bugzilla – Attachment 153690 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.12 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-07-19 20:35:46 UTC
(
hide
)
Description:
Bug 34313: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-07-19 20:35:46 UTC
Size:
2.12 KB
patch
obsolete
>From 5657c241cf8929fd398f2c8e1cf9d8ca1cb7bf9c 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 > >--- > 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 d21a4c5f111..1d69ce5ed6a 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 = { > identifier => $userid, >-- >2.41.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 34313
:
153685
|
153686
|
153690
|
153691
|
153787
|
153788
|
154462
|
154463