From 05a2c58f790cc2de03ff2a9f52700f55982d36b4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 2 Mar 2019 11:03:01 -0300 Subject: [PATCH] Bug 18925: (QA follow-up) Fix basic_workflow.t Signed-off-by: Tomas Cohen Arazi Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- t/db_dependent/selenium/basic_workflow.t | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/selenium/basic_workflow.t b/t/db_dependent/selenium/basic_workflow.t index 9e9341f103..b7a55d11eb 100644 --- a/t/db_dependent/selenium/basic_workflow.t +++ b/t/db_dependent/selenium/basic_workflow.t @@ -38,6 +38,8 @@ use Time::HiRes qw(gettimeofday); use C4::Context; use C4::Biblio qw( AddBiblio ); # We shouldn't use it +use Koha::CirculationRules; + use Test::More tests => 20; use MARC::Record; use MARC::Field; @@ -147,7 +149,18 @@ SKIP: { $dbh->do(q|INSERT INTO itemtypes (itemtype, description, rentalcharge, notforloan) VALUES (?, ?, ?, ?)|, undef, $itemtype->{itemtype}, $itemtype->{description}, $itemtype->{rentalcharge}, $itemtype->{notforloan}); my $issuing_rules = $sample_data->{issuingrule}; - $dbh->do(q|INSERT INTO issuingrules (categorycode, itemtype, branchcode, maxissueqty, issuelength, lengthunit, renewalperiod) VALUES (?, ?, ?, ?, ?, ?, ?)|, undef, $issuing_rules->{categorycode}, $issuing_rules->{itemtype}, $issuing_rules->{branchcode}, $issuing_rules->{maxissueqty}, $issuing_rules->{issuelength}, $issuing_rules->{lengthunit}, $issuing_rules->{renewalperiod}); + $dbh->do(q|INSERT INTO issuingrules (categorycode, itemtype, branchcode, issuelength, lengthunit, renewalperiod) VALUES (?, ?, ?, ?, ?, ?)|, undef, $issuing_rules->{categorycode}, $issuing_rules->{itemtype}, $issuing_rules->{branchcode}, $issuing_rules->{issuelength}, $issuing_rules->{lengthunit}, $issuing_rules->{renewalperiod}); + Koha::CirculationRules->set_rules( + { + categorycode => $issuing_rules->{categorycode}, + itemtype => $issuing_rules->{itemtype}, + branchcode => $issuing_rules->{branchcode}, + rules => { + maxissueqty => $issuing_rules->{maxissueqty} + } + } + ); + for my $biblionumber ( @biblionumbers ) { $driver->get($base_url."/cataloguing/additem.pl?biblionumber=$biblionumber"); -- 2.39.5