|
Lines 44-50
my $biblioitem = $schema->resultset('Biblioitem')->new(
Link Here
|
| 44 |
} |
44 |
} |
| 45 |
)->insert(); |
45 |
)->insert(); |
| 46 |
|
46 |
|
| 47 |
subtest 'holds + holds_placed_before_today' => sub { |
47 |
subtest 'holds + current_holds' => sub { |
| 48 |
plan tests => 5; |
48 |
plan tests => 5; |
| 49 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber ); |
49 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber ); |
| 50 |
my $holds = $biblio->holds; |
50 |
my $holds = $biblio->holds; |
|
Lines 57-64
subtest 'holds + holds_placed_before_today' => sub {
Link Here
|
| 57 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber, undef, undef, dt_from_string->add( days => 2 ) ); |
57 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber, undef, undef, dt_from_string->add( days => 2 ) ); |
| 58 |
$holds = $biblio->holds; |
58 |
$holds = $biblio->holds; |
| 59 |
is( $holds->count, 1, '->holds should return future holds' ); |
59 |
is( $holds->count, 1, '->holds should return future holds' ); |
| 60 |
$holds = $biblio->holds_placed_before_today; |
60 |
$holds = $biblio->current_holds; |
| 61 |
is( $holds->count, 0, '->holds_placed_before_today should not return future holds' ); |
61 |
is( $holds->count, 0, '->current_holds should not return future holds' ); |
| 62 |
$holds->delete; |
62 |
$holds->delete; |
| 63 |
|
63 |
|
| 64 |
}; |
64 |
}; |
| 65 |
- |
|
|