Bugzilla – Attachment 80136 Details for
Bug 21178
Add Koha::Patron::set_password method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21178: (QA follow-up) Add a test to verify that the hash is correct
Bug-21178-QA-follow-up-Add-a-test-to-verify-that-t.patch (text/plain), 1.36 KB, created by
Julian Maurice
on 2018-10-05 15:23:21 UTC
(
hide
)
Description:
Bug 21178: (QA follow-up) Add a test to verify that the hash is correct
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-10-05 15:23:21 UTC
Size:
1.36 KB
patch
obsolete
>From e14e1b80518f020ac763bab87c52c479b972c1ba Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 5 Oct 2018 17:18:57 +0200 >Subject: [PATCH] Bug 21178: (QA follow-up) Add a test to verify that the hash > is correct > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Koha/Patrons.t | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 35fff0ff54..61e552c31c 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -28,6 +28,7 @@ use JSON; > > use C4::Circulation; > use C4::Biblio; >+use C4::Auth qw(checkpw_hash); > > use Koha::Holds; > use Koha::Patrons; >@@ -1502,7 +1503,7 @@ subtest '->store' => sub { > > subtest '->set_password' => sub { > >- plan tests => 11; >+ plan tests => 12; > > $schema->storage->txn_begin; > >@@ -1555,6 +1556,7 @@ subtest '->set_password' => sub { > $patron->discard_changes; > > isnt( $patron->password, $old_digest, 'Password has been updated' ); >+ ok( checkpw_hash('abcd a', $patron->password), 'Password hash is correct' ); > is( $patron->login_attempts, 0, 'Login attemps have been reset' ); > > my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count; >-- >2.17.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 21178
:
77575
|
77576
|
77577
|
77578
|
77632
|
77885
|
77886
|
77916
|
77917
|
78833
|
80133
|
80134
|
80135
| 80136