Bug 21178: (QA follow-up) whitespace characters fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2018-09-14 16:15:13 -07:00
parent 4a7c6fa10c
commit c7299bc773
2 changed files with 3 additions and 5 deletions

View file

@ -668,7 +668,7 @@ Exceptions are thrown if the password is not good enough.
=item Koha::Exceptions::Password::TooShort
=item Koha::Exceptions::Password::TrailingWhitespaces
=item Koha::Exceptions::Password::WhitespaceCharacters
=item Koha::Exceptions::Password::TooWeak
@ -691,8 +691,7 @@ sub set_password {
{ length => $password_length, min_length => $min_length } );
}
elsif ( $error eq 'has_whitespaces' ) {
Koha::Exceptions::Password::TrailingWhitespaces->throw(
"Password contains trailing spaces, which is forbidden.");
Koha::Exceptions::Password::WhitespaceCharacters->throw();
}
elsif ( $error eq 'too_weak' ) {
Koha::Exceptions::Password::TooWeak->throw();

View file

@ -1500,7 +1500,6 @@ subtest '->store' => sub {
$schema->storage->txn_rollback;
};
subtest '->set_password' => sub {
plan tests => 11;
@ -1530,7 +1529,7 @@ subtest '->set_password' => sub {
# Trailing spaces tests
throws_ok { $patron->set_password('abcD12d '); }
'Koha::Exceptions::Password::TrailingWhitespaces',
'Koha::Exceptions::Password::WhitespaceCharacters',
'Password contains trailing spaces, exception is thrown';
# Require strong password tests