From 0afd7b3a97cb27d0ab37ff30134fbe6ebd659f75 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Wed, 22 Feb 2023 14:44:52 +0100 Subject: [PATCH] Bug 32092: Fix tests Signed-off-by: Emily Lamancusa Signed-off-by: Kyle M Hall --- t/db_dependent/Koha/CirculationRules.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/db_dependent/Koha/CirculationRules.t b/t/db_dependent/Koha/CirculationRules.t index 18c8653523..86bd7e1dae 100755 --- a/t/db_dependent/Koha/CirculationRules.t +++ b/t/db_dependent/Koha/CirculationRules.t @@ -580,9 +580,13 @@ subtest 'get_onshelfholds_policy() tests' => sub { } ); + my $memory_cache = Koha::Cache::Memory::Lite->get_instance; + $memory_cache->flush(); + is( $circ_rules->get_onshelfholds_policy({ item => $item }), 1, 'If rule_value is set on a matching rule, return it' ); # Delete the rule (i.e. get_effective_rule returns undef) $circ_rules->delete; + $memory_cache->flush(); is( $circ_rules->get_onshelfholds_policy({ item => $item }), 0, 'If no matching rule, fallback to 0' ); $schema->storage->txn_rollback; @@ -853,6 +857,7 @@ subtest 'get_lostreturn_policy() tests' => sub { ) ->next ->delete; + $memory_cache->flush(); is_deeply( Koha::CirculationRules->get_lostreturn_policy( $params ), { lostreturn => 'refund', processingreturn => 'refund' },'No rule for branch, no default rule, fallback default (refund)'); -- 2.30.2