Bugzilla – Attachment 10349 Details for
Bug 8110
Add tests for Calendar modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Holidays Test Plan - DB Dependent
Holidays-Test-Plan---DB-Dependent.patch (text/plain), 1.91 KB, created by
Kyle M Hall
on 2012-06-18 11:28:41 UTC
(
hide
)
Description:
Holidays Test Plan - DB Dependent
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-06-18 11:28:41 UTC
Size:
1.91 KB
patch
obsolete
>From d2aaec226ec13b33269a6de4f4377e9b237b75cd Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 18 Jun 2012 07:28:15 -0400 >Subject: [PATCH] Holidays Test Plan - DB Dependent > >This test file is meant to be used with the sample database >with a minimum of the sample libraries and sample holidays installed. > >http://bugs.koha-community.org/show_bug.cgi?id=8110 >--- > t/db_dependent/Holidays.t | 45 +++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 45 insertions(+), 0 deletions(-) > create mode 100755 t/db_dependent/Holidays.t > >diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t >new file mode 100755 >index 0000000..5c4da1b >--- /dev/null >+++ b/t/db_dependent/Holidays.t >@@ -0,0 +1,45 @@ >+use strict; >+use warnings; >+use 5.010; >+use DateTime; >+use DateTime::TimeZone; >+ >+use C4::Context; >+use Test::More tests => 8; >+ >+BEGIN { use_ok('Koha::Calendar'); } >+BEGIN { use_ok('C4::Calendar'); } >+ >+my $branchcode = 'MPL'; >+ >+my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); >+my $c4_calendar = C4::Calendar->new( branchcode => $branchcode ); >+ >+isa_ok( $koha_calendar, 'Koha::Calendar', 'Koha::Calendar class returned' ); >+isa_ok( $c4_calendar, 'C4::Calendar', 'C4::Calendar class returned' ); >+ >+my $sunday = DateTime->new( >+ year => 2011, >+ month => 6, >+ day => 26, >+); >+my $monday = DateTime->new( >+ year => 2011, >+ month => 6, >+ day => 27, >+); >+my $christmas = DateTime->new( >+ year => 2032, >+ month => 12, >+ day => 25, >+); >+my $newyear = DateTime->new( >+ year => 2035, >+ month => 1, >+ day => 1, >+); >+ >+is( $koha_calendar->is_holiday($sunday), 1, 'Sunday is a closed day' ); >+is( $koha_calendar->is_holiday($monday), 0, 'Monday is not a closed day' ); >+is( $koha_calendar->is_holiday($christmas), 1, 'Christmas is a closed day' ); >+is( $koha_calendar->is_holiday($newyear), 1, 'New Years day is a closed day' ); >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8110
:
10349
|
10353
|
10356
|
10363
|
10368
|
10382
|
10383
|
10384
|
10385
|
10387
|
10388
|
10389
|
10608
|
11027