From 3ff0ec3d39275bea95b6cad566721ccb357fe78e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 21 Jun 2017 11:05:59 -0300 Subject: [PATCH] Bug 18651: Fix tests if no circ rule exist The following test is failing on Jenkins: # Subtest: Handle ids duplication 1..4 ok 1 - No account lines should exist on old issue_id not ok 2 - Two account lines should exist on new issue_id ok 3 - AddReturn should return the issue with the new issue_id ok 4 - If an item is checked-in, it should be moved to old_issues even if the issue_id already existed in the table not ok 4 - Handle ids duplication When no circ rule exist --- t/db_dependent/Circulation/Returns.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t index 69cf309..19e6313 100644 --- a/t/db_dependent/Circulation/Returns.t +++ b/t/db_dependent/Circulation/Returns.t @@ -47,6 +47,17 @@ my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new(); +Koha::IssuingRules->search->delete; +my $rule = Koha::IssuingRule->new( + { + categorycode => '*', + itemtype => '*', + branchcode => '*', + maxissueqty => 99, + issuelength => 1, + } +); +$rule->store(); subtest "InProcessingToShelvingCart tests" => sub { -- 2.1.4