The cache 'exception_holidays' may be populated when we run these tests,
we need to clear it before the tests are run.
Test plan:
prove t/db_dependent/Circulation/CalcDateDue.t t/Calendar.t
Without this patch, t/Calendar will fail with:
# Failed test 'Exception holiday is not a closed day test'
# at t/Calendar.t line 159.
# got: '1'
# expected: '0'
# Looks like you failed 1 test of 38.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
], "add fixtures";
my $cache = Koha::Caches->get_instance();
-$cache->clear_from_cache( 'single_holidays') ;
+$cache->clear_from_cache( 'single_holidays' ) ;
+$cache->clear_from_cache( 'exception_holidays' ) ;
# 'MPL' branch is arbitrary, is not used at all but is needed for initialization
my $cal = Koha::Calendar->new( branchcode => 'MPL' );
is ( $cal->is_holiday($holiday_for_another_branch), 1, 'Holiday defined for CPL should be defined as an holiday' );
}
+END {
+ $cache->clear_from_cache( 'single_holidays' ) ;
+ $cache->clear_from_cache( 'exception_holidays' ) ;
+};