Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 39; |
5 |
use Test::More tests => 42; |
6 |
|
6 |
|
7 |
use MARC::Record; |
7 |
use MARC::Record; |
8 |
use DateTime::Duration; |
8 |
use DateTime::Duration; |
Lines 402-407
AddReserve('CPL', $requesters{'CPL'}, $item_bibnum,
Link Here
|
402 |
$title, $checkitem, ''); |
402 |
$title, $checkitem, ''); |
403 |
my (undef, $canres, undef) = CheckReserves($itemnumber); |
403 |
my (undef, $canres, undef) = CheckReserves($itemnumber); |
404 |
|
404 |
|
|
|
405 |
is( CanReserveBeCanceledFromOpac(), undef, |
406 |
'CanReserveBeCanceledFromOpac should return undef if called without any parameter' |
407 |
); |
408 |
is( |
409 |
CanReserveBeCanceledFromOpac( $canres->{resserve_id} ), |
410 |
undef, |
411 |
'CanReserveBeCanceledFromOpac should return undef if called without the reserve_id' |
412 |
); |
413 |
is( |
414 |
CanReserveBeCanceledFromOpac( undef, $requesters{CPL} ), |
415 |
undef, |
416 |
'CanReserveBeCanceledFromOpac should return undef if called without borrowernumber' |
417 |
); |
418 |
|
405 |
my $cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'}); |
419 |
my $cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'}); |
406 |
is($cancancel, 1, 'Can user cancel its own reserve'); |
420 |
is($cancancel, 1, 'Can user cancel its own reserve'); |
407 |
|
421 |
|
408 |
- |
|
|