Lines 62-68
subtest 'store' => sub {
Link Here
|
62 |
}; |
62 |
}; |
63 |
|
63 |
|
64 |
subtest 'holds + current_holds' => sub { |
64 |
subtest 'holds + current_holds' => sub { |
65 |
plan tests => 5; |
65 |
plan tests => 6; |
66 |
C4::Reserves::AddReserve( |
66 |
C4::Reserves::AddReserve( |
67 |
{ |
67 |
{ |
68 |
branchcode => $patron->branchcode, |
68 |
branchcode => $patron->branchcode, |
Lines 85-96
subtest 'holds + current_holds' => sub {
Link Here
|
85 |
reservation_date => dt_from_string->add( days => 2 ), |
85 |
reservation_date => dt_from_string->add( days => 2 ), |
86 |
} |
86 |
} |
87 |
); |
87 |
); |
|
|
88 |
t::lib::Mocks::mock_preference( 'ConfirmFutureHolds', 0 ); |
88 |
$holds = $biblio->holds; |
89 |
$holds = $biblio->holds; |
89 |
is( $holds->count, 1, '->holds should return future holds' ); |
90 |
is( $holds->count, 1, '->holds should return future holds' ); |
90 |
$holds = $biblio->current_holds; |
91 |
$holds = $biblio->current_holds; |
91 |
is( $holds->count, 0, '->current_holds should not return future holds' ); |
92 |
is( $holds->count, 0, '->current_holds without lookahead should not return future holds' ); |
|
|
93 |
t::lib::Mocks::mock_preference( 'ConfirmFutureHolds', 2 ); |
94 |
$holds = $biblio->current_holds; |
95 |
is( $holds->count, 1, '->current_holds with lookahead returns future holds' ); |
92 |
$holds->delete; |
96 |
$holds->delete; |
93 |
|
97 |
t::lib::Mocks::mock_preference( 'ConfirmFutureHolds', 0 ); |
94 |
}; |
98 |
}; |
95 |
|
99 |
|
96 |
subtest 'waiting_or_in_transit' => sub { |
100 |
subtest 'waiting_or_in_transit' => sub { |
97 |
- |
|
|