Bugzilla – Attachment 153787 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.18 KB, created by
Katrin Fischer
on 2023-07-21 13:14:38 UTC
(
hide
)
Description:
Bug 34313: Unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-21 13:14:38 UTC
Size:
2.18 KB
patch
obsolete
>From a0b151a416cba2fb74c2de2b189eba66f57666cf 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> >--- > 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 d21a4c5f11..1d69ce5ed6 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.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