From 5f55775f402d4f4b56ab82426588b202d6f327ce Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Sep 2023 16:13:40 +0200 Subject: [PATCH] Bug 34846: Fix SIP/ILS.t if DB has been upgraded t/db_dependent/SIP/ILS.t .. 12/15 # Failed test 'Renewal succeeded' # at t/db_dependent/SIP/ILS.t line 346. # got: '0' # expected: '1' # Looks like you failed 1 test of 2. t/db_dependent/SIP/ILS.t .. 15/15 # Failed test 'renew' # at t/db_dependent/SIP/ILS.t line 348. # Looks like you failed 1 test of 15. Because renewalsallowed is 0 for upgraded DB, when it's 5 for new install. We need to set the value. Test plan: perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only prove t/db_dependent/SIP/ILS.t Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/SIP/ILS.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/db_dependent/SIP/ILS.t b/t/db_dependent/SIP/ILS.t index 4b62dc051a..5943e4036e 100755 --- a/t/db_dependent/SIP/ILS.t +++ b/t/db_dependent/SIP/ILS.t @@ -329,6 +329,16 @@ subtest renew => sub { ); t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } ); + Koha::CirculationRules->set_rule( + { + categorycode => undef, + itemtype => undef, + branchcode => undef, + rule_name => 'renewalsallowed', + rule_value => '5', + } + ); + my $item = $builder->build_sample_item( { library => $library->branchcode, -- 2.39.5