|
Lines 119-125
subtest 'enqueue() tests' => sub {
Link Here
|
| 119 |
shibboleth => undef, |
119 |
shibboleth => undef, |
| 120 |
desk_id => undef, |
120 |
desk_id => undef, |
| 121 |
desk_name => undef, |
121 |
desk_name => undef, |
| 122 |
interface => $interface |
122 |
interface => $interface, |
|
|
123 |
|
| 124 |
# session_id must not be logged! |
| 123 |
}; |
125 |
}; |
| 124 |
|
126 |
|
| 125 |
$job_id = Koha::BackgroundJob::BatchUpdateItem->new->enqueue( { record_ids => [ 1, 2, 3 ] } ); |
127 |
$job_id = Koha::BackgroundJob::BatchUpdateItem->new->enqueue( { record_ids => [ 1, 2, 3 ] } ); |
|
Lines 218-223
subtest 'process tests' => sub {
Link Here
|
| 218 |
shibboleth => undef, |
220 |
shibboleth => undef, |
| 219 |
desk_id => undef, |
221 |
desk_id => undef, |
| 220 |
desk_name => undef, |
222 |
desk_name => undef, |
|
|
223 |
|
| 224 |
# session_id must not be logged! |
| 221 |
}; |
225 |
}; |
| 222 |
|
226 |
|
| 223 |
my $background_job_module = Test::MockModule->new('Koha::BackgroundJob'); |
227 |
my $background_job_module = Test::MockModule->new('Koha::BackgroundJob'); |
|
Lines 237-243
subtest 'process tests' => sub {
Link Here
|
| 237 |
is( C4::Context->interface, 'opac', "Interface set to opac prior to calling process" ); |
241 |
is( C4::Context->interface, 'opac', "Interface set to opac prior to calling process" ); |
| 238 |
|
242 |
|
| 239 |
$job->process(); |
243 |
$job->process(); |
| 240 |
is_deeply( C4::Context->userenv, $job_context, "Userenv set from job context on process" ); |
244 |
my $expected_context = C4::Context->userenv; |
|
|
245 |
delete $expected_context->{session_id}; |
| 246 |
is_deeply( $expected_context, $job_context, "Userenv set from job context on process" ); |
| 241 |
is_deeply( C4::Context->interface, 'intranet', "Interface set from job context on process" ); |
247 |
is_deeply( C4::Context->interface, 'intranet', "Interface set from job context on process" ); |
| 242 |
|
248 |
|
| 243 |
# Manually add a job (->new->store) without context |
249 |
# Manually add a job (->new->store) without context |
| 244 |
- |
|
|