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