Lines 50-59
is( $job->status, 'completed', "testing finished" );
Link Here
|
50 |
ok( $job->results ); #Will return undef unless finished |
50 |
ok( $job->results ); #Will return undef unless finished |
51 |
|
51 |
|
52 |
my $second_job = C4::BackgroundJob->new( $sessionID, "making new job" ); |
52 |
my $second_job = C4::BackgroundJob->new( $sessionID, "making new job" ); |
53 |
$session = C4::Auth::get_session( $job->{sessionID} ); |
53 |
is( ref( C4::BackgroundJob->fetch( $sessionID, $job->id ) ), "C4::BackgroundJob", 'job_$jobid should be a C4::BackgroundJob for uncleared job 1' ); |
54 |
is( ref( $session->param( 'job_' . $job->id ) ), "C4::BackgroundJob", 'job_$jobid should be a C4::BackgroundJob for uncleared job 1' ); |
54 |
is( ref( C4::BackgroundJob->fetch( $sessionID, $second_job->id ) ), "C4::BackgroundJob", 'job_$jobid should be a C4::BackgroundJob for uncleared job 2' ); |
55 |
is( ref( $session->param( 'job_' . $second_job->id ) ), "C4::BackgroundJob", 'job_$jobid should be a C4::BackgroundJob for uncleared job 2' ); |
|
|
56 |
$job->clear; |
55 |
$job->clear; |
57 |
$session = C4::Auth::get_session( $job->{sessionID} ); |
56 |
is( C4::BackgroundJob->fetch( $sessionID, $job->id ), undef, 'After clearing it, job 1 should not exist anymore in the session' ); |
58 |
is( $session->param( 'job_' . $job->id ), undef, 'After clearing it, job 1 should not exist anymore in the session' ); |
57 |
is( ref( C4::BackgroundJob->fetch( $sessionID, $second_job->id ) ), "C4::BackgroundJob", 'After clear on job 1, job 2 should still be a C4::BackgroundJob' ); |
59 |
is( ref( $session->param( 'job_' . $second_job->id ) ), "C4::BackgroundJob", 'After clear on job 1, job 2 should still be a C4::BackgroundJob' ); |
|
|
60 |
- |
|
|