Bug 22059: regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 2 Jan 2019 12:56:21 +0000 (09:56 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 8 Jan 2019 13:46:47 +0000 (13:46 +0000)
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>
t/db_dependent/Koha/Patrons.t

index f636377..ca4ae7b 100644 (file)
@@ -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'); }