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