Lines 444-449
subtest '_timeout_syspref' => sub {
Link Here
|
444 |
subtest 'check_cookie_auth' => sub { |
444 |
subtest 'check_cookie_auth' => sub { |
445 |
plan tests => 1; |
445 |
plan tests => 1; |
446 |
|
446 |
|
|
|
447 |
t::lib::Mocks::mock_preference('timeout', "1d"); # back to default |
448 |
|
447 |
my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 1 } }); |
449 |
my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { flags => 1 } }); |
448 |
|
450 |
|
449 |
# Mock a CGI object with real userid param |
451 |
# Mock a CGI object with real userid param |
Lines 453-459
subtest 'check_cookie_auth' => sub {
Link Here
|
453 |
sub { |
455 |
sub { |
454 |
my $var = shift; |
456 |
my $var = shift; |
455 |
if ( $var eq 'userid' ) { return $patron->userid; } |
457 |
if ( $var eq 'userid' ) { return $patron->userid; } |
456 |
elsif ( $var eq 'timeout' ) { return 3600; } |
|
|
457 |
} |
458 |
} |
458 |
); |
459 |
); |
459 |
$cgi->mock('multi_param', sub {return q{}} ); |
460 |
$cgi->mock('multi_param', sub {return q{}} ); |
460 |
- |
|
|