@@ -, +, @@ --- t/db_dependent/Koha/Patrons.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/Patrons.t +++ a/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'); } --