@@ -, +, @@ --- t/db_dependent/Calendar.t | 8 ++++++++ t/db_dependent/Holidays.t | 12 ++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) --- a/t/db_dependent/Calendar.t +++ a/t/db_dependent/Calendar.t @@ -3,6 +3,14 @@ use Modern::Perl; use Test::More tests => 18; use C4::Calendar; +use C4::Context; + +my $dbh = C4::Context->dbh(); +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1; + +$dbh->do("DELETE FROM calendar_events"); +$dbh->do("DELETE FROM calendar_repeats"); my $new_holiday = { open_hour => 0, open_minute => 0, --- a/t/db_dependent/Holidays.t +++ a/t/db_dependent/Holidays.t @@ -7,6 +7,8 @@ use DateTime::TimeZone; use C4::Context; use Test::More tests => 6; +use C4::Calendar; + BEGIN { use_ok('Koha::Calendar'); } my $dbh = C4::Context->dbh(); @@ -14,6 +16,16 @@ my $dbh = C4::Context->dbh(); $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; +my $new_holiday = { open_hour => 0, + open_minute => 0, + close_hour => 0, + close_minute => 0, + title => 'example week_day_holiday', + description => 'This is an example week_day_holiday used for testing' }; + +# Weekly events +ModRepeatingEvent( 'MPL', 0, undef, undef, $new_holiday ); + my $branchcode = 'MPL'; my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); --