Lines 8-14
use Koha::DateUtils;
Link Here
|
8 |
use t::lib::Mocks; |
8 |
use t::lib::Mocks; |
9 |
use t::lib::TestBuilder; |
9 |
use t::lib::TestBuilder; |
10 |
|
10 |
|
11 |
use Test::More tests => 6; |
11 |
use Test::More tests => 5; |
12 |
|
12 |
|
13 |
use_ok('C4::Reserves'); |
13 |
use_ok('C4::Reserves'); |
14 |
|
14 |
|
Lines 63-74
my $reserve2 = $builder->build({
Link Here
|
63 |
|
63 |
|
64 |
CancelExpiredReserves(); |
64 |
CancelExpiredReserves(); |
65 |
my $r2 = Koha::Holds->find($reserve2->{reserve_id}); |
65 |
my $r2 = Koha::Holds->find($reserve2->{reserve_id}); |
66 |
ok($r2, 'Without ExpireReservesMaxPickUpDelay, reserve 2 should not be canceled.'); |
66 |
is($r2, undef,'reserve 2 should be canceled.'); |
67 |
|
|
|
68 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelay', 1); |
69 |
CancelExpiredReserves(); |
70 |
$r2 = Koha::Holds->find($reserve2->{reserve_id}); |
71 |
is($r2, undef,'With ExpireReservesMaxPickUpDelay, reserve 2 should be canceled.'); |
72 |
|
67 |
|
73 |
# Reserve expired on holiday |
68 |
# Reserve expired on holiday |
74 |
my $reserve3 = $builder->build({ |
69 |
my $reserve3 = $builder->build({ |
75 |
- |
|
|