Lines 1529-1535
subtest '->store' => sub {
Link Here
|
1529 |
|
1529 |
|
1530 |
subtest '->set_password' => sub { |
1530 |
subtest '->set_password' => sub { |
1531 |
|
1531 |
|
1532 |
plan tests => 12; |
1532 |
plan tests => 13; |
1533 |
|
1533 |
|
1534 |
$schema->storage->txn_begin; |
1534 |
$schema->storage->txn_begin; |
1535 |
|
1535 |
|
Lines 1543-1548
subtest '->set_password' => sub {
Link Here
|
1543 |
throws_ok { $patron->set_password('ab'); } |
1543 |
throws_ok { $patron->set_password('ab'); } |
1544 |
'Koha::Exceptions::Password::TooShort', |
1544 |
'Koha::Exceptions::Password::TooShort', |
1545 |
'minPasswordLength is undef, fall back to 3, fail test'; |
1545 |
'minPasswordLength is undef, fall back to 3, fail test'; |
|
|
1546 |
is( "$@", |
1547 |
'Password length (2) is shorter than required (3)', |
1548 |
'Exception parameters passed correctly' |
1549 |
); |
1546 |
|
1550 |
|
1547 |
t::lib::Mocks::mock_preference( 'minPasswordLength', 2 ); |
1551 |
t::lib::Mocks::mock_preference( 'minPasswordLength', 2 ); |
1548 |
throws_ok { $patron->set_password('ab'); } |
1552 |
throws_ok { $patron->set_password('ab'); } |
1549 |
- |
|
|