|
Lines 9-15
use C4::Circulation;
Link Here
|
| 9 |
use Koha::DateUtils; |
9 |
use Koha::DateUtils; |
| 10 |
use DateTime::Duration; |
10 |
use DateTime::Duration; |
| 11 |
|
11 |
|
| 12 |
use Test::More tests => 12; |
12 |
use Test::More tests => 15; |
| 13 |
|
13 |
|
| 14 |
BEGIN { |
14 |
BEGIN { |
| 15 |
use_ok('C4::Circulation'); |
15 |
use_ok('C4::Circulation'); |
|
Lines 129-136
is(
Link Here
|
| 129 |
1, |
129 |
1, |
| 130 |
"A Branch TransferLimit has been added" |
130 |
"A Branch TransferLimit has been added" |
| 131 |
); |
131 |
); |
| 132 |
#FIXME :The following test should pass but doesn't because currently the routine CreateBranchTransferLimit returns nothing |
132 |
is(CreateBranchTransferLimit(),undef, |
| 133 |
#is(CreateBranchTransferLimit(),undef,"Without parameters CreateBranchTransferLimit returns undef"); |
133 |
"Without parameters CreateBranchTransferLimit returns undef"); |
|
|
134 |
is(CreateBranchTransferLimit($samplebranch2->{branchcode}),undef, |
| 135 |
"With only tobranch CreateBranchTransferLimit returns undef"); |
| 136 |
is(CreateBranchTransferLimit(undef,$samplebranch2->{branchcode}),undef, |
| 137 |
"With only frombranch CreateBranchTransferLimit returns undef"); |
| 138 |
#FIXME: Currently, we can add a transferlimit even to nonexistent branches because in the database, |
| 139 |
#branch_transfer_limits.toBranch and branch_transfer_limits.fromBranch aren't foreign keys |
| 140 |
#is(CreateBranchTransferLimit(-1,-1,'CODE'),0,"With wrong CreateBranchTransferLimit returns 0 - No transfertlimit added"); |
| 134 |
|
141 |
|
| 135 |
#Test GetTransfers |
142 |
#Test GetTransfers |
| 136 |
my $dt_today = dt_from_string( undef, 'sql', undef ); |
143 |
my $dt_today = dt_from_string( undef, 'sql', undef ); |
| 137 |
- |
|
|