Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
subtest '->set_password' => sub {
- plan tests => 12;
+ plan tests => 13;
$schema->storage->txn_begin;
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'); }