Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 17; |
5 |
use Test::More tests => 25; |
6 |
use MARC::Record; |
6 |
use MARC::Record; |
7 |
use DateTime::Duration; |
7 |
use DateTime::Duration; |
8 |
|
8 |
|
Lines 215-220
is( $messages->{ResFound}->{borrowernumber},
Link Here
|
215 |
$requesters{'RPL'}, |
215 |
$requesters{'RPL'}, |
216 |
'for generous library, its items fill first hold request in line (bug 10272)'); |
216 |
'for generous library, its items fill first hold request in line (bug 10272)'); |
217 |
|
217 |
|
|
|
218 |
my (undef, $reserves) = GetReservesFromBiblionumber($biblionumber); |
219 |
isa_ok($reserves, 'ARRAY'); |
220 |
is(scalar @$reserves, 1, "Only one reserves for this biblio"); |
221 |
my $reserve_id = $reserves->[0]->{reserve_id}; |
222 |
|
223 |
$reserve = GetReserve($reserve_id); |
224 |
isa_ok($reserve, 'HASH', "GetReserve return"); |
225 |
is($reserve->{biblionumber}, $biblionumber); |
226 |
|
227 |
$reserve = CancelReserveFromId($reserve_id); |
228 |
isa_ok($reserve, 'HASH', "CancelReserveFromId return"); |
229 |
is($reserve->{biblionumber}, $biblionumber); |
230 |
|
231 |
$reserve = GetReserve($reserve_id); |
232 |
is($reserve, undef, "GetReserve returns undef after deletion"); |
233 |
|
234 |
$reserve = CancelReserveFromId($reserve_id); |
235 |
is($reserve, undef, "CancelReserveFromId return undef if reserve does not exist"); |
236 |
|
237 |
|
218 |
# Tests for bug 9761 (ConfirmFutureHolds): new CheckReserves lookahead parameter, and corresponding change in AddReturn |
238 |
# Tests for bug 9761 (ConfirmFutureHolds): new CheckReserves lookahead parameter, and corresponding change in AddReturn |
219 |
# Note that CheckReserve uses its lookahead parameter and does not check ConfirmFutureHolds pref (it should be passed if needed like AddReturn does) |
239 |
# Note that CheckReserve uses its lookahead parameter and does not check ConfirmFutureHolds pref (it should be passed if needed like AddReturn does) |
220 |
# Test 9761a: Add a reserve without date, CheckReserve should return it |
240 |
# Test 9761a: Add a reserve without date, CheckReserve should return it |
221 |
- |
|
|