Lines 19-24
my $dbh = C4::Context->dbh;
Link Here
|
19 |
$dbh->{AutoCommit} = 0; |
19 |
$dbh->{AutoCommit} = 0; |
20 |
$dbh->{RaiseError} = 1; |
20 |
$dbh->{RaiseError} = 1; |
21 |
$dbh->do(q{DELETE FROM special_holidays}); |
21 |
$dbh->do(q{DELETE FROM special_holidays}); |
|
|
22 |
$dbh->do(q{DELETE FROM repeatable_holidays}); |
23 |
$dbh->do("DELETE FROM reserves"); |
22 |
|
24 |
|
23 |
my $builder = t::lib::TestBuilder->new(); |
25 |
my $builder = t::lib::TestBuilder->new(); |
24 |
|
26 |
|
Lines 135-141
my $reserve1 = $builder->build({
Link Here
|
135 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelay', 1); |
137 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelay', 1); |
136 |
t::lib::Mocks::mock_preference('ReservesMaxPickUpDelay', 6); |
138 |
t::lib::Mocks::mock_preference('ReservesMaxPickUpDelay', 6); |
137 |
|
139 |
|
138 |
ModReserveAffect( $item1->{itemnumber}, $patron1->{borrowernumber}, 0); |
140 |
ModReserveAffect( $item1->{itemnumber}, $patron1->{borrowernumber}); |
139 |
my $r = Koha::Holds->find($reserve1->{reserve_id}); |
141 |
my $r = Koha::Holds->find($reserve1->{reserve_id}); |
140 |
|
142 |
|
141 |
is($r->waitingdate, $today->ymd, 'Waiting date should be set to today' ); |
143 |
is($r->waitingdate, $today->ymd, 'Waiting date should be set to today' ); |
Lines 207-214
my $holiday2 = $builder->build({
Link Here
|
207 |
}, |
209 |
}, |
208 |
}); |
210 |
}); |
209 |
|
211 |
|
|
|
212 |
Koha::Caches->get_instance->flush_all; |
213 |
|
210 |
t::lib::Mocks::mock_preference('ExcludeHolidaysFromMaxPickUpDelay', 1); |
214 |
t::lib::Mocks::mock_preference('ExcludeHolidaysFromMaxPickUpDelay', 1); |
211 |
ModReserveAffect( $item3->{itemnumber}, $patron2->{borrowernumber}, 0); |
215 |
ModReserveAffect( $item3->{itemnumber}, $patron2->{borrowernumber}); |
212 |
|
216 |
|
213 |
# Add 6 days of pickup delay + 1 day of holiday. |
217 |
# Add 6 days of pickup delay + 1 day of holiday. |
214 |
my $expected_expiration = $today->clone; |
218 |
my $expected_expiration = $today->clone; |
215 |
- |
|
|