Lines 29-34
use File::Temp qw(tempdir);
Link Here
|
29 |
use t::lib::Mocks; |
29 |
use t::lib::Mocks; |
30 |
use t::lib::Mocks::Logger; |
30 |
use t::lib::Mocks::Logger; |
31 |
use t::lib::TestBuilder; |
31 |
use t::lib::TestBuilder; |
|
|
32 |
use t::lib::Dates; |
32 |
|
33 |
|
33 |
use C4::Auth_with_shibboleth qw( shib_ok login_shib_url get_login_shib checkpw_shib ); |
34 |
use C4::Auth_with_shibboleth qw( shib_ok login_shib_url get_login_shib checkpw_shib ); |
34 |
use Koha::Database; |
35 |
use Koha::Database; |
Lines 309-323
subtest "checkpw_shib tests" => sub {
Link Here
|
309 |
$ENV{'emailpro'} = 'me@myemail.com'; |
310 |
$ENV{'emailpro'} = 'me@myemail.com'; |
310 |
$ENV{branchcode} = $library->branchcode; # needed since T::D::C does no longer hides the FK constraint |
311 |
$ENV{branchcode} = $library->branchcode; # needed since T::D::C does no longer hides the FK constraint |
311 |
|
312 |
|
312 |
my $time_now = dt_from_string()->ymd . ' ' . dt_from_string()->hms; |
|
|
313 |
checkpw($shib_login); |
313 |
checkpw($shib_login); |
314 |
ok my $new_user_autocreated = $schema->resultset('Borrower')->search( { 'userid' => 'test43210' }, { rows => 1 } ), |
314 |
ok( |
315 |
"new user found"; |
315 |
my $new_user_autocreated = Koha::Patrons->find( { userid => 'test43210' } ), |
|
|
316 |
"new user found" |
317 |
); |
316 |
|
318 |
|
317 |
my $rec_autocreated = $new_user_autocreated->next; |
319 |
is( |
318 |
is_deeply( |
320 |
t::lib::Dates::compare( $new_user_autocreated->updated_on, dt_from_string ), 0, |
319 |
[ map { $rec_autocreated->$_ } qw/updated_on/ ], |
|
|
320 |
[$time_now], |
321 |
'updated_on correctly saved on newly created user' |
321 |
'updated_on correctly saved on newly created user' |
322 |
); |
322 |
); |
323 |
}; |
323 |
}; |
324 |
- |
|
|