Bug 29884: Run missing test in api/v1/patrons.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 14 Jan 2022 14:17:56 +0000 (15:17 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 19 Jan 2022 07:15:04 +0000 (21:15 -1000)
compare is not calling is() or ok(), it's caller job to do it.

Test plan:
  prove t/db_dependent/api/v1/patrons.t
should still return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/api/v1/patrons.t

index b7e65dc..dc8e56a 100755 (executable)
@@ -545,7 +545,7 @@ subtest 'update() tests' => sub {
     $schema->storage->txn_rollback;
 
     subtest 'librarian access tests' => sub {
-        plan tests => 44;
+        plan tests => 45;
 
         $schema->storage->txn_begin;
 
@@ -659,7 +659,7 @@ subtest 'update() tests' => sub {
         my $updated_on_got = delete $got->{updated_on};
         my $updated_on_expected = delete $newpatron->{updated_on};
         is_deeply($got, $newpatron, 'Returned patron from update matches expected');
-        t::lib::Dates::compare( $updated_on_got, $updated_on_expected, 'updated_on values matched' );
+        is( t::lib::Dates::compare( $updated_on_got, $updated_on_expected ), 0, 'updated_on values matched' );
 
         is(Koha::Patrons->find( $patron_2->id )->cardnumber,
            $newpatron->{ cardnumber }, 'Patron is really updated!');