From 7f62d5dd284fda575ef965c7611288876676af74 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 90eb827aff0..a272ea92037 100755 --- a/t/db_dependent/Koha/CirculationRules.t +++ b/t/db_dependent/Koha/CirculationRules.t @@ -628,9 +628,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; @@ -901,6 +905,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.42.0