Lines 101-107
my $reservedate = $first_hold->reservedate;
Link Here
|
101 |
my $borrowernumber = $first_hold->borrowernumber; |
101 |
my $borrowernumber = $first_hold->borrowernumber; |
102 |
my $branch_1code = $first_hold->branchcode; |
102 |
my $branch_1code = $first_hold->branchcode; |
103 |
my $reserve_id = $first_hold->reserve_id; |
103 |
my $reserve_id = $first_hold->reserve_id; |
104 |
is( $reservedate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), "holds_placed_today should return a valid reserve date"); |
104 |
is( dt_from_string( $reservedate ), dt_from_string, "holds_placed_today should return a valid reserve date"); |
105 |
is( $borrowernumber, $borrowernumbers[0], "holds_placed_today should return a valid borrowernumber"); |
105 |
is( $borrowernumber, $borrowernumbers[0], "holds_placed_today should return a valid borrowernumber"); |
106 |
is( $branch_1code, $branch_1, "holds_placed_today should return a valid branchcode"); |
106 |
is( $branch_1code, $branch_1, "holds_placed_today should return a valid branchcode"); |
107 |
ok($reserve_id, "Test holds_placed_today()"); |
107 |
ok($reserve_id, "Test holds_placed_today()"); |
Lines 711-717
subtest 'CanItemBeReserved / holds_per_day tests' => sub {
Link Here
|
711 |
is_deeply( |
711 |
is_deeply( |
712 |
CanItemBeReserved( $patron->borrowernumber, $itemnumber_2 ), |
712 |
CanItemBeReserved( $patron->borrowernumber, $itemnumber_2 ), |
713 |
{ status => 'tooManyReservesToday', limit => 2 }, |
713 |
{ status => 'tooManyReservesToday', limit => 2 }, |
714 |
'Patron cannot a third item with 2 reserves daily cap' |
714 |
'Patron cannot reserve a third item with 2 reserves daily cap' |
715 |
); |
715 |
); |
716 |
|
716 |
|
717 |
# Update last hold so reservedate is in the past, so 2 holds, but different day |
717 |
# Update last hold so reservedate is in the past, so 2 holds, but different day |
718 |
- |
|
|