Bugzilla – Attachment 31052 Details for
Bug 12801
Koha::Calendar is caching holidays for the wrong branch!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12801 - Unit Test
Bug-12801---Unit-Test.patch (text/plain), 1.39 KB, created by
Kyle M Hall (khall)
on 2014-08-21 13:47:41 UTC
(
hide
)
Description:
Bug 12801 - Unit Test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-08-21 13:47:41 UTC
Size:
1.39 KB
patch
obsolete
>From a0e9a12b43828cb9b284ccd809e51cb3c26ce895 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 21 Aug 2014 09:47:37 -0400 >Subject: [PATCH] Bug 12801 - Unit Test > >--- > t/db_dependent/Holidays.t | 13 ++++++++++++- > 1 files changed, 12 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t >index 9d41105..5941691 100755 >--- a/t/db_dependent/Holidays.t >+++ b/t/db_dependent/Holidays.t >@@ -5,7 +5,8 @@ use DateTime; > use DateTime::TimeZone; > > use C4::Context; >-use Test::More tests => 10; >+use Koha::DateUtils; >+use Test::More tests => 12; > > BEGIN { use_ok('Koha::Calendar'); } > BEGIN { use_ok('C4::Calendar'); } >@@ -53,3 +54,13 @@ is( $koha_calendar->is_holiday($custom_holiday), 0, '2013-11-10 does not start o > $koha_calendar->add_holiday($custom_holiday); > is( $koha_calendar->is_holiday($custom_holiday), 1, 'able to add holiday for testing' ); > >+my $today = dt_from_string(); >+C4::Calendar->new( branchcode => 'CPL' )->insert_single_holiday( >+ day => $today->day(), >+ month => $today->month(), >+ year => $today->year(), >+ title => "$today", >+ description => "$today", >+); >+is( Koha::Calendar->new( branchcode => 'CPL' )->is_holiday( $today ), 1, "Today is a holiday for CPL" ); >+is( Koha::Calendar->new( branchcode => 'MPL' )->is_holiday( $today ), 0, "Today is not a holiday for MPL"); >-- >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 12801
:
31052
|
31053
|
31056
|
31075
|
32514
|
32515
|
32516