diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t index 601820df1e..f6e47fb450 100755 --- a/t/db_dependent/Auth_with_ldap.t +++ b/t/db_dependent/Auth_with_ldap.t @@ -276,10 +276,11 @@ subtest 'checkpw_ldap tests' => sub { $welcome = 0; # replicate testing with checkpw + my $time_now = dt_from_string()->ymd . ' ' . dt_from_string()->hms; C4::Auth::checkpw( 'hola', password => 'hey' ); my $patron_replicated_from_auth = Koha::Patrons->search( { userid => 'hola' } )->next; is( - $patron_replicated_from_auth->updated_on, dt_from_string()->ymd . ' ' . dt_from_string()->hms, + $patron_replicated_from_auth->updated_on, $time_now, "updated_on correctly saved on newly created user" ); diff --git a/t/db_dependent/Auth_with_shibboleth.t b/t/db_dependent/Auth_with_shibboleth.t index f650d58143..2e518f9e85 100755 --- a/t/db_dependent/Auth_with_shibboleth.t +++ b/t/db_dependent/Auth_with_shibboleth.t @@ -288,6 +288,7 @@ subtest "checkpw_shib tests" => sub { $ENV{'emailpro'} = 'me@myemail.com'; $ENV{branchcode} = $library->branchcode; # needed since T::D::C does no longer hides the FK constraint + my $time_now = dt_from_string()->ymd . ' ' . dt_from_string()->hms; checkpw($shib_login); ok my $new_user_autocreated = $schema->resultset('Borrower')->search( { 'userid' => 'test43210' }, { rows => 1 } ), "new user found"; @@ -295,7 +296,7 @@ subtest "checkpw_shib tests" => sub { my $rec_autocreated = $new_user_autocreated->next; is_deeply( [ map { $rec_autocreated->$_ } qw/updated_on/ ], - [ dt_from_string()->ymd . ' ' . dt_from_string()->hms ], + [$time_now], 'updated_on correctly saved on newly created user' ); };