View | Details | Raw Unified | Return to bug 36822
Collapse All | Expand All

(-)a/t/db_dependent/Auth_with_ldap.t (-3 / +4 lines)
Lines 276-287 subtest 'checkpw_ldap tests' => sub { Link Here
276
        $welcome   = 0;
276
        $welcome   = 0;
277
277
278
        # replicate testing with checkpw
278
        # replicate testing with checkpw
279
        my $time_now = dt_from_string()->ymd . ' ' . dt_from_string()->hms;
280
        C4::Auth::checkpw( 'hola', password => 'hey' );
279
        C4::Auth::checkpw( 'hola', password => 'hey' );
281
        my $patron_replicated_from_auth = Koha::Patrons->search( { userid => 'hola' } )->next;
280
        my $patron_replicated_from_auth = Koha::Patrons->search( { userid => 'hola' } )->next;
281
        my $patrons_updated_on = $patron_replicated_from_auth->updated_on;
282
        $patrons_updated_on =~ s/:\d+$//;
282
        is(
283
        is(
283
            $patron_replicated_from_auth->updated_on, $time_now,
284
            $patrons_updated_on, dt_from_string()->strftime('%Y-%m-%d %H:%M'),
284
            "updated_on correctly saved on newly created user"
285
            "updated_on correctly saved on newly created user, ignoring seconds"
285
        );
286
        );
286
287
287
        $patron_replicated_from_auth->delete;
288
        $patron_replicated_from_auth->delete;
(-)a/t/db_dependent/Auth_with_shibboleth.t (-4 / +4 lines)
Lines 309-323 subtest "checkpw_shib tests" => sub { Link Here
309
    $ENV{'emailpro'} = 'me@myemail.com';
309
    $ENV{'emailpro'} = 'me@myemail.com';
310
    $ENV{branchcode} = $library->branchcode;      # needed since T::D::C does no longer hides the FK constraint
310
    $ENV{branchcode} = $library->branchcode;      # needed since T::D::C does no longer hides the FK constraint
311
311
312
    my $time_now = dt_from_string()->ymd . ' ' . dt_from_string()->hms;
313
    checkpw($shib_login);
312
    checkpw($shib_login);
314
    ok my $new_user_autocreated = $schema->resultset('Borrower')->search( { 'userid' => 'test43210' }, { rows => 1 } ),
313
    ok my $new_user_autocreated = $schema->resultset('Borrower')->search( { 'userid' => 'test43210' }, { rows => 1 } ),
315
        "new user found";
314
        "new user found";
316
315
317
    my $rec_autocreated = $new_user_autocreated->next;
316
    my $rec_autocreated = $new_user_autocreated->next;
317
    my $patrons_updated_on = $rec_autocreated->updated_on;
318
    $patrons_updated_on =~ s/:\d+$//;
318
    is_deeply(
319
    is_deeply(
319
        [ map { $rec_autocreated->$_ } qw/updated_on/ ],
320
        [$patrons_updated_on],
320
        [$time_now],
321
        [ dt_from_string()->strftime('%Y-%m-%d %H:%M') ],
321
        'updated_on correctly saved on newly created user'
322
        'updated_on correctly saved on newly created user'
322
    );
323
    );
323
};
324
};
324
- 

Return to bug 36822