Bugzilla – Attachment 104351 Details for
Bug 18308
Default value of minPasswordLength should be increased
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18308: fix failing tests
Bug-18308-fix-failing-tests.patch (text/plain), 2.13 KB, created by
Jonathan Druart
on 2020-05-05 08:27:36 UTC
(
hide
)
Description:
Bug 18308: fix failing tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-05 08:27:36 UTC
Size:
2.13 KB
patch
obsolete
>From cf591bdf807a227dec62bff06e37d8f1d9503f36 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 5 May 2020 10:26:55 +0200 >Subject: [PATCH] Bug 18308: fix failing tests > > # Failed test 'check_password hook tests' > # at t/db_dependent/Koha/Plugins/Patron.t line 83. > [The password was rejected by a plugin]# Looks like your test exited with 255 just after 5. >--- > t/db_dependent/Koha/Plugins/Patron.t | 4 ++-- > t/lib/Koha/Plugin/Test.pm | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Plugins/Patron.t b/t/db_dependent/Koha/Plugins/Patron.t >index 22bf9b2210..f0002feb45 100644 >--- a/t/db_dependent/Koha/Plugins/Patron.t >+++ b/t/db_dependent/Koha/Plugins/Patron.t >@@ -69,13 +69,13 @@ subtest 'check_password hook tests' => sub { > > throws_ok { $patron->store } 'Koha::Exceptions::Password::Plugin', > 'Exception raised for adding patron with bad password'; >- $patron->password('1234'); >+ $patron->password('12345678'); > ok( $patron->store, 'Patron created with good password' ); > > t::lib::Mocks::mock_preference( 'RequireStrongPassword', '0' ); > throws_ok { $patron->set_password({ password => 'explosion' }) } 'Koha::Exceptions::Password::Plugin', > 'Exception raised for update patron password with bad string'; >- ok( $patron->set_password({ password => '4321' }), 'Patron password updated with good string' ); >+ ok( $patron->set_password({ password => '87654321' }), 'Patron password updated with good string' ); > ok( $patron->set_password({ password => 'explosion', skip_validation => 1}), 'Patron password updated via skip validation'); > > $schema->storage->txn_rollback; >diff --git a/t/lib/Koha/Plugin/Test.pm b/t/lib/Koha/Plugin/Test.pm >index 3c2896b726..39c2bfa364 100644 >--- a/t/lib/Koha/Plugin/Test.pm >+++ b/t/lib/Koha/Plugin/Test.pm >@@ -218,7 +218,7 @@ sub check_password { > my ( $self, $args ) = @_; > > my $password = $args->{'password'}; >- if ( $password && $password =~ m/^\d\d\d\d$/ ) { >+ if ( $password && $password =~ m/^\d{8}$/ ) { > return { error => 0 }; > } > else { >-- >2.20.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 18308
:
68374
|
68381
|
68451
|
69318
|
69319
|
69320
|
69321
|
69323
|
69324
|
69459
|
69461
|
69462
|
87124
|
87125
|
87126
|
87128
|
87129
|
87339
|
87340
|
87564
|
87572
|
87573
|
87747
|
87959
|
87960
|
87961
|
87962
|
87963
|
87964
|
87966
|
88010
|
88011
|
88012
|
88013
|
88014
|
88242
|
88243
|
88306
|
88307
|
88308
|
88309
|
88310
|
88311
|
88312
|
88313
|
88314
|
88315
|
88316
|
88317
|
88318
|
88319
|
88320
|
88321
|
88840
|
90079
|
103617
|
104235
|
104236
| 104351