From bf15a64ee2014162d32ae1965f6464423c0c0517 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 2 Jan 2019 09:56:21 -0300 Subject: [PATCH] Bug 22059: regression tests Signed-off-by: Kyle M Hall --- t/db_dependent/Koha/Patrons.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 9dda5295cd..7d3b5c9dc4 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -1529,7 +1529,7 @@ subtest '->store' => sub { subtest '->set_password' => sub { - plan tests => 12; + plan tests => 13; $schema->storage->txn_begin; @@ -1543,6 +1543,10 @@ subtest '->set_password' => sub { throws_ok { $patron->set_password('ab'); } 'Koha::Exceptions::Password::TooShort', 'minPasswordLength is undef, fall back to 3, fail test'; + is( "$@", + 'Password length (2) is shorter than required (3)', + 'Exception parameters passed correctly' + ); t::lib::Mocks::mock_preference( 'minPasswordLength', 2 ); throws_ok { $patron->set_password('ab'); } -- 2.17.2 (Apple Git-113)