Browse Source

Bug 18936: Replace an other insert into issuingrules

Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Jonathan Druart 5 years ago
committed by Martin Renvoize
parent
commit
2894ac09c7
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 28
      t/db_dependent/Circulation.t
  2. 2
      t/db_dependent/Circulation/GetHardDueDate.t

28
t/db_dependent/Circulation.t

@ -2974,17 +2974,23 @@ subtest 'ItemsDeniedRenewal preference' => sub {
C4::Context->set_preference('ItemsDeniedRenewal','');
my $idr_lib = $builder->build_object({ class => 'Koha::Libraries'});
$dbh->do(
q{
INSERT INTO issuingrules ( categorycode, branchcode, itemtype, reservesallowed, issuelength, lengthunit, renewalsallowed, renewalperiod,
norenewalbefore, auto_renew, fine, chargeperiod ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
},
{},
'*', $idr_lib->branchcode, '*', 25,
14, 'days',
10, 7,
undef, 0,
.10, 1
Koha::CirculationRules->set_rules(
{
categorycode => '*',
itemtype => '*',
branchcode => $idr_lib->branchcode,
rules => {
reservesallowed => 25,
issuelength => 14,
lengthunit => 'days',
renewalsallowed => 10,
renewalperiod => 7,
norenewalbefore => undef,
auto_renew => 0,
fine => .10,
chargeperiod => 1,
}
}
);
my $deny_book = $builder->build_object({ class => 'Koha::Items', value => {

2
t/db_dependent/Circulation/GetHardDueDate.t

@ -10,7 +10,7 @@ use Koha::Library;
use t::lib::TestBuilder;
use Test::More tests => 10;
use Test::More tests => 9;
BEGIN {
use_ok('C4::Circulation');

Loading…
Cancel
Save