Lines 11-16
use Test::More tests => 12;
Link Here
|
11 |
BEGIN { use_ok('Koha::Calendar'); } |
11 |
BEGIN { use_ok('Koha::Calendar'); } |
12 |
BEGIN { use_ok('C4::Calendar'); } |
12 |
BEGIN { use_ok('C4::Calendar'); } |
13 |
|
13 |
|
|
|
14 |
my $dbh = C4::Context->dbh(); |
15 |
# Start transaction |
16 |
$dbh->{AutoCommit} = 0; |
17 |
$dbh->{RaiseError} = 1; |
18 |
|
14 |
my $branchcode = 'MPL'; |
19 |
my $branchcode = 'MPL'; |
15 |
|
20 |
|
16 |
my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); |
21 |
my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); |
Lines 45-50
is( $koha_calendar->is_holiday($monday), 0, 'Monday is not a closed day' );
Link Here
|
45 |
is( $koha_calendar->is_holiday($christmas), 1, 'Christmas is a closed day' ); |
50 |
is( $koha_calendar->is_holiday($christmas), 1, 'Christmas is a closed day' ); |
46 |
is( $koha_calendar->is_holiday($newyear), 1, 'New Years day is a closed day' ); |
51 |
is( $koha_calendar->is_holiday($newyear), 1, 'New Years day is a closed day' ); |
47 |
|
52 |
|
|
|
53 |
$dbh->do("DELETE FROM repeatable_holidays"); |
54 |
$dbh->do("DELETE FROM special_holidays"); |
55 |
|
48 |
my $custom_holiday = DateTime->new( |
56 |
my $custom_holiday = DateTime->new( |
49 |
year => 2013, |
57 |
year => 2013, |
50 |
month => 11, |
58 |
month => 11, |
51 |
- |
|
|