From 9a6c405337b4a35794421686c8ae5decaab2f0b9 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 Content-Type: text/plain; charset=utf-8 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 --- 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 3bc5f63146..8bf93f383b 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.30.2