Bugzilla – Attachment 32567 Details for
Bug 13115
Holidays.t will fail some unit tests on Sundays
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13115 - Holidays.t will fail some unit tests on Sundays
PASSED-QA-Bug-13115---Holidayst-will-fail-some-uni.patch (text/plain), 1.81 KB, created by
Katrin Fischer
on 2014-10-21 21:26:15 UTC
(
hide
)
Description:
[PASSED QA] Bug 13115 - Holidays.t will fail some unit tests on Sundays
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-10-21 21:26:15 UTC
Size:
1.81 KB
patch
obsolete
>From 5aac90a6ab7b89c526d9f78e425fe98d74baaba6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 20 Oct 2014 01:56:46 -0400 >Subject: [PATCH] [PASSED QA] Bug 13115 - Holidays.t will fail some unit tests > on Sundays > >Due to the fact that Sunday is a repeating holiday in the example data >which is used for part but not all of Holidays.t, the last test will >fail on Sundays. The test is to see if today is *not* a special holiday >for MPL, but since it's already a repeating holiday, is_holiday will >return true rather than false. > >Test Plan: >1) Wait until Sunday >2) prove t/db_dependent/Holidays.t >3) Note the failure >4) Apply this patch >5) Repeat step 2 >6) Note there is no longer a failure > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Used my time machine... :) >--- > t/db_dependent/Holidays.t | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t >index 5941691..75bbc1c 100755 >--- a/t/db_dependent/Holidays.t >+++ b/t/db_dependent/Holidays.t >@@ -11,6 +11,11 @@ use Test::More tests => 12; > BEGIN { use_ok('Koha::Calendar'); } > BEGIN { use_ok('C4::Calendar'); } > >+my $dbh = C4::Context->dbh(); >+# Start transaction >+$dbh->{AutoCommit} = 0; >+$dbh->{RaiseError} = 1; >+ > my $branchcode = 'MPL'; > > my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); >@@ -45,6 +50,9 @@ 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' ); > >+$dbh->do("DELETE FROM repeatable_holidays"); >+$dbh->do("DELETE FROM special_holidays"); >+ > my $custom_holiday = DateTime->new( > year => 2013, > month => 11, >-- >1.9.1
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 13115
:
32530
|
32532
| 32567