Merge remote branch 'kc/new/bug_4218' into kcmaster
[koha.git] / t / db_dependent / BackgroundJob.t
1 #!/usr/bin/perl
2 #
3 # This Koha test module is a stub!  
4 # Add more tests here!!!
5
6 use strict;
7 use warnings;
8 use C4::Auth;
9 use CGI;
10 use Test::More tests => 8;
11
12 BEGIN {
13         use_ok('C4::BackgroundJob');
14 }
15 my $query = new CGI;
16 my ($userid, $cookie, $sessionID) = &checkauth($query, 1);
17 #my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
18 my $background;
19 diag $sessionID;
20 ok ($background=C4::BackgroundJob->new($sessionID));
21 ok ($background->id);
22
23 $background->name("George");
24 is ($background->name, "George", "testing name");
25
26 $background->invoker("enjoys");
27 is ($background->invoker, "enjoys", "testing invoker");
28
29 $background->progress("testing");
30 is ($background->progress, "testing", "testing progress");
31
32 ok ($background->status);
33
34 $background->size("56");
35 is ($background->size, "56", "testing size");
36