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 => 19; |
12 |
use Test::More tests => 22; |
13 |
use Test::Deep; |
13 |
use Test::Deep; |
14 |
|
14 |
|
15 |
BEGIN { |
15 |
BEGIN { |
Lines 198-202
is( C4::Circulation::DeleteTransfer($item_id1),
Link Here
|
198 |
is(C4::Circulation::DeleteTransfer(),undef,"Without itemid DeleteTransfer returns undef"); |
198 |
is(C4::Circulation::DeleteTransfer(),undef,"Without itemid DeleteTransfer returns undef"); |
199 |
is(C4::Circulation::DeleteTransfer(-1),'0E0',"with a wrong itemid DeleteTranfer returns 0E0"); |
199 |
is(C4::Circulation::DeleteTransfer(-1),'0E0',"with a wrong itemid DeleteTranfer returns 0E0"); |
200 |
|
200 |
|
|
|
201 |
#Test TransferSlip |
202 |
is( C4::Circulation::TransferSlip($samplebranch1->{branchcode}, undef, 5, $samplebranch2->{branchcode}), |
203 |
undef, "No tranferslip if invalid or undef itemnumber or barcode" ); |
204 |
is( C4::Circulation::TransferSlip($samplebranch1->{branchcode}, $item_id1, 1, $samplebranch2->{branchcode})->{'code'}, |
205 |
'TRANSFERSLIP', "Get a transferslip on valid itemnumber and/or barcode" ); |
206 |
cmp_deeply( |
207 |
C4::Circulation::TransferSlip($samplebranch1->{branchcode}, $item_id1, undef, $samplebranch2->{branchcode}), |
208 |
C4::Circulation::TransferSlip($samplebranch1->{branchcode}, undef, 1, $samplebranch2->{branchcode}), |
209 |
"Barcode and itemnumber for same item both generate same TransferSlip" |
210 |
); |
211 |
|
201 |
#End transaction |
212 |
#End transaction |
202 |
$dbh->rollback; |
213 |
$dbh->rollback; |
203 |
- |
|
|