Lines 2-9
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 35; |
5 |
use Test::More tests => 43; |
6 |
|
|
|
7 |
use MARC::Record; |
6 |
use MARC::Record; |
8 |
use DateTime::Duration; |
7 |
use DateTime::Duration; |
9 |
|
8 |
|
Lines 257-262
is( $messages->{ResFound}->{borrowernumber},
Link Here
|
257 |
$requesters{'RPL'}, |
256 |
$requesters{'RPL'}, |
258 |
'for generous library, its items fill first hold request in line (bug 10272)'); |
257 |
'for generous library, its items fill first hold request in line (bug 10272)'); |
259 |
|
258 |
|
|
|
259 |
my $reserves = GetReservesFromBiblionumber({biblionumber => $biblionumber}); |
260 |
isa_ok($reserves, 'ARRAY'); |
261 |
is(scalar @$reserves, 1, "Only one reserves for this biblio"); |
262 |
my $reserve_id = $reserves->[0]->{reserve_id}; |
263 |
|
264 |
$reserve = GetReserve($reserve_id); |
265 |
isa_ok($reserve, 'HASH', "GetReserve return"); |
266 |
is($reserve->{biblionumber}, $biblionumber); |
267 |
|
268 |
$reserve = CancelReserve({reserve_id => $reserve_id}); |
269 |
isa_ok($reserve, 'HASH', "CancelReserve return"); |
270 |
is($reserve->{biblionumber}, $biblionumber); |
271 |
|
272 |
$reserve = GetReserve($reserve_id); |
273 |
is($reserve, undef, "GetReserve returns undef after deletion"); |
274 |
|
275 |
$reserve = CancelReserve({reserve_id => $reserve_id}); |
276 |
is($reserve, undef, "CancelReserve return undef if reserve does not exist"); |
277 |
|
278 |
|
260 |
# Tests for bug 9761 (ConfirmFutureHolds): new CheckReserves lookahead parameter, and corresponding change in AddReturn |
279 |
# Tests for bug 9761 (ConfirmFutureHolds): new CheckReserves lookahead parameter, and corresponding change in AddReturn |
261 |
# Note that CheckReserve uses its lookahead parameter and does not check ConfirmFutureHolds pref (it should be passed if needed like AddReturn does) |
280 |
# Note that CheckReserve uses its lookahead parameter and does not check ConfirmFutureHolds pref (it should be passed if needed like AddReturn does) |
262 |
# Test 9761a: Add a reserve without date, CheckReserve should return it |
281 |
# Test 9761a: Add a reserve without date, CheckReserve should return it |
263 |
- |
|
|