+subtest 'days_mode parameter' => sub {
+ plan tests => 2;
+
+ t::lib::Mocks::mock_preference('useDaysMode', 'Days');
+ my $cal = Koha::Calendar->new( branchcode => 'CPL' );
+ is( $cal->{days_mode}, 'Days', q|If not set, days_mode defaults to syspref's value|);
+
+ $cal = Koha::Calendar->new( branchcode => 'CPL', days_mode => 'Calendar' );
+ is( $cal->{days_mode}, 'Calendar', q|If set, days_mode is correctly set|);
+};
+
+END {
+ $cache->clear_from_cache( 'single_holidays' ) ;
+ $cache->clear_from_cache( 'exception_holidays' ) ;
+};