Bug 22059: regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 2 Jan 2019 12:56:21 +0000 (09:56 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 10 Jan 2019 13:24:46 +0000 (13:24 +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>
(cherry picked from commit 3ef3ecfe99e219fda854ca57c652e3c52a7f47d7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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'); }