Bug 22061: (follow-up) set_password expects a hashref
[koha.git] / t / db_dependent / Patrons.t
index a1c7ad9..f0d116a 100755 (executable)
@@ -24,6 +24,7 @@ use C4::Context;
 use Koha::Database;
 use Koha::DateUtils;
 
+use t::lib::Dates;
 use t::lib::TestBuilder;
 
 BEGIN {
@@ -71,13 +72,13 @@ $b3->store();
 my $b1_new = Koha::Patrons->find( $b1->borrowernumber() );
 is( $b1->surname(), $b1_new->surname(), "Found matching patron" );
 isnt( $b1_new->updated_on, undef, "borrowers.updated_on should be set" );
-is( dt_from_string($b1_new->updated_on), $now, "borrowers.updated_on should have been set to now on creating" );
+is( t::lib::Dates::compare( $b1_new->updated_on, $now), 0, "borrowers.updated_on should have been set to now on creating" );
 
 my $b3_new = Koha::Patrons->find( $b3->borrowernumber() );
-is( dt_from_string($b3_new->updated_on), $three_days_ago, "borrowers.updated_on should have been kept to what we set on creating" );
+is( t::lib::Dates::compare( $b3_new->updated_on, $three_days_ago), 0, "borrowers.updated_on should have been kept to what we set on creating" );
 $b3_new->set({ firstname => 'Some first name for Test 3' })->store();
 $b3_new = Koha::Patrons->find( $b3->borrowernumber() );
-is( dt_from_string($b3_new->updated_on), dt_from_string, "borrowers.updated_on should have been set to now on updating" );
+is( t::lib::Dates::compare( $b3_new->updated_on, $now), 0, "borrowers.updated_on should have been set to now on updating" );
 
 my @patrons = Koha::Patrons->search( { branchcode => $branchcode } );
 is( @patrons, 3, "Found 3 patrons with Search" );