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

(-)a/t/db_dependent/BackgroundJob.t (-7 / +15 lines)
Lines 3-19 Link Here
3
# This Koha test module is a stub!  
3
# This Koha test module is a stub!  
4
# Add more tests here!!!
4
# Add more tests here!!!
5
5
6
use strict;
6
use Modern::Perl;
7
use warnings;
8
use C4::Auth;
9
use CGI qw ( -utf8 );
7
use CGI qw ( -utf8 );
10
use Test::More tests => 14;
8
use Test::More tests => 15;
11
9
12
BEGIN {
10
BEGIN {
13
        use_ok('C4::BackgroundJob');
11
        use_ok('C4::BackgroundJob');
14
}
12
}
13
14
# we need a session cookie
15
my $query = new CGI;
15
my $query = new CGI;
16
my ($userid, $cookie, $sessionID) = &checkauth($query, 1);
16
my ($userid, $sessionID) = ('frederic', '1234');
17
my $cookie = $query->cookie(
18
    -name     => 'CGISESSID',
19
    -value    => 'test_background_job',
20
    -HttpOnly => 1
21
);
22
17
#my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
23
#my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
18
my $background;
24
my $background;
19
diag $sessionID;
25
diag $sessionID;
Lines 46-49 is ($background->size, "56", '->set() does not scribble over private object data Link Here
46
$background->finish("finished");
52
$background->finish("finished");
47
is ($background->status,'completed', "testing finished");
53
is ($background->status,'completed', "testing finished");
48
54
49
ok ($background->results); #Will return undef unless finished
55
ok ($background->results, "valid result"); #Will return undef unless finished
56
57
can_ok($background, 'clear');
58
$background->clear();
50
- 

Return to bug 13606