Bug 21832: add unit test
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 12 Feb 2019 14:52:22 +0000 (15:52 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 26 Mar 2019 09:14:13 +0000 (09:14 +0000)
Adds a check that is_expired exists in service GetPatronInfo.

Test plan :
Run : prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove ref to bug number, we have git for that

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20ce110f5c656f51bad262708d4b577568c1a52a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e305856af7b713868206e385fb1abac7a79a9d8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

t/db_dependent/ILSDI_Services.t

index 9b6908f..210e05d 100644 (file)
@@ -103,7 +103,7 @@ subtest 'AuthenticatePatron test' => sub {
 
 subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes' => sub {
 
-    plan tests => 2;
+    plan tests => 3;
 
     $schema->storage->txn_begin;
 
@@ -228,6 +228,8 @@ subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
     # Check results:
     is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' );
 
+    ok( exists $reply->{is_expired}, 'There should be the is_expired information');
+
     # Cleanup
     $schema->storage->txn_rollback;
 };