From 3ef3ecfe99e219fda854ca57c652e3c52a7f47d7 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 Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- 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 f636377ffe..ca4ae7bb7f 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -1518,7 +1518,7 @@ subtest '->store' => sub { subtest '->set_password' => sub { - plan tests => 12; + plan tests => 13; $schema->storage->txn_begin; @@ -1532,6 +1532,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.20.1