If you run TooMany or MultiplePerRecord.t after
t/db_dependent/Circulation/Returns.t (for instance) and that you are
running memcached, item-level_itypes will be 0.
These tests assume that the pref is 1
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$dbh->do(q|DELETE FROM issuingrules|);
my $builder = t::lib::TestBuilder->new();
+t::lib::Mocks::mock_preference('item-level_itypes', 1); # Assuming the item type is defined at item level
my $branch = $builder->build({
source => 'Branch',
use Test::More tests => 38;
use t::lib::TestBuilder;
+use t::lib::Mocks;
use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved );
use Koha::Database;
}
)->insert();
+t::lib::Mocks::mock_preference('item-level_itypes', 1); # Assuming the item type is defined at item level
+
my $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} );
is( $max, 1, 'GetMaxPatronHoldsForRecord returns max of 1' );
my $rule = C4::Reserves::GetHoldRule(