Lines 21-26
use Modern::Perl;
Link Here
|
21 |
|
21 |
|
22 |
use Test::More tests => 38; |
22 |
use Test::More tests => 38; |
23 |
use t::lib::TestBuilder; |
23 |
use t::lib::TestBuilder; |
|
|
24 |
use t::lib::Mocks; |
24 |
|
25 |
|
25 |
use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved ); |
26 |
use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved ); |
26 |
use Koha::Database; |
27 |
use Koha::Database; |
Lines 119-124
my $rule1 = $rules_rs->new(
Link Here
|
119 |
} |
120 |
} |
120 |
)->insert(); |
121 |
)->insert(); |
121 |
|
122 |
|
|
|
123 |
t::lib::Mocks::mock_preference('item-level_itypes', 1); # Assuming the item type is defined at item level |
124 |
|
122 |
my $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} ); |
125 |
my $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} ); |
123 |
is( $max, 1, 'GetMaxPatronHoldsForRecord returns max of 1' ); |
126 |
is( $max, 1, 'GetMaxPatronHoldsForRecord returns max of 1' ); |
124 |
my $rule = C4::Reserves::GetHoldRule( |
127 |
my $rule = C4::Reserves::GetHoldRule( |
125 |
- |
|
|