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

(-)a/t/db_dependent/BackgroundJob.t (-6 / +8 lines)
Lines 7-13 use strict; Link Here
7
use warnings;
7
use warnings;
8
use C4::Auth;
8
use C4::Auth;
9
use CGI;
9
use CGI;
10
use Test::More tests => 10;
10
use Test::More tests => 11;
11
11
12
BEGIN {
12
BEGIN {
13
        use_ok('C4::BackgroundJob');
13
        use_ok('C4::BackgroundJob');
Lines 17-24 my ($userid, $cookie, $sessionID) = &checkauth($query, 1); Link Here
17
#my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
17
#my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
18
my $background;
18
my $background;
19
diag $sessionID;
19
diag $sessionID;
20
ok ($background=C4::BackgroundJob->new($sessionID));
20
ok ($background=C4::BackgroundJob->new($sessionID), "making job");
21
ok ($background->id);
21
ok ($background->id, "fetching id number");
22
22
23
$background->name("George");
23
$background->name("George");
24
is ($background->name, "George", "testing name");
24
is ($background->name, "George", "testing name");
Lines 29-40 is ($background->invoker, "enjoys", "testing invoker"); Link Here
29
$background->progress("testing");
29
$background->progress("testing");
30
is ($background->progress, "testing", "testing progress");
30
is ($background->progress, "testing", "testing progress");
31
31
32
ok ($background->status);
32
ok ($background->status, "testing status");
33
33
34
$background->size("56");
34
$background->size("56");
35
is ($background->size, "56", "testing size");
35
is ($background->size, "56", "testing size");
36
36
37
ok (!$background->fetch($sessionID, $background->id), "testing fetch");
38
39
37
$background->finish("finished");
40
$background->finish("finished");
38
is ($background->status,'completed', "testing finished");
41
is ($background->status,'completed', "testing finished");
39
42
40
ok ($background->results); # Will return undef unless finished
43
ok ($background->results); #Will return undef unless finished
41
- 

Return to bug 5327