Lines 2-7
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
use C4::Circulation; |
4 |
use C4::Circulation; |
|
|
5 |
|
6 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
5 |
use Koha::Library; |
7 |
use Koha::Library; |
6 |
|
8 |
|
7 |
use Test::More tests => 7; |
9 |
use Test::More tests => 7; |
Lines 51-62
my $samplebranch1 = {
Link Here
|
51 |
}; |
53 |
}; |
52 |
Koha::Library->new($samplebranch1)->store; |
54 |
Koha::Library->new($samplebranch1)->store; |
53 |
|
55 |
|
|
|
56 |
my $now = dt_from_string->truncate( to => 'minute' ); |
57 |
|
54 |
#Begin Tests |
58 |
#Begin Tests |
55 |
#Test AddOfflineOperation |
59 |
#Test AddOfflineOperation |
56 |
is( |
60 |
is( |
57 |
AddOfflineOperation( |
61 |
AddOfflineOperation( |
58 |
'User1', $samplebranch1->{branchcode}, |
62 |
'User1', $samplebranch1->{branchcode}, |
59 |
'null', 'Action1', 'CODE', 'Cardnumber1', 10 |
63 |
$now, 'Action1', 'CODE', 'Cardnumber1', 10 |
60 |
), |
64 |
), |
61 |
'Added.', |
65 |
'Added.', |
62 |
"OfflineOperation has been added" |
66 |
"OfflineOperation has been added" |
Lines 71-77
is_deeply(
Link Here
|
71 |
operationid => $offline_id, |
75 |
operationid => $offline_id, |
72 |
userid => 'User1', |
76 |
userid => 'User1', |
73 |
branchcode => $samplebranch1->{branchcode}, |
77 |
branchcode => $samplebranch1->{branchcode}, |
74 |
timestamp => "0000-00-00 00:00:00", |
78 |
# FIXME sounds like we need a 'timestamp' dateformat |
|
|
79 |
timestamp => output_pref({ dt => $now, dateformat => 'iso', dateonly => 0 }) . ':00', |
75 |
action => 'Action1', |
80 |
action => 'Action1', |
76 |
barcode => 'CODE', |
81 |
barcode => 'CODE', |
77 |
cardnumber => 'Cardnumber1', |
82 |
cardnumber => 'Cardnumber1', |
78 |
- |
|
|