Bug 13115 - Holidays.t will fail some unit tests on Sundays
Summary: Holidays.t will fail some unit tests on Sundays
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 13:03 UTC by Kyle M Hall
Modified: 2015-06-04 23:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13115 - Holidays.t will fail some unit tests on Sundays (1.68 KB, patch)
2014-10-20 13:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13115 - Holidays.t will fail some unit tests on Sundays (1.72 KB, patch)
2014-10-20 13:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 13115 - Holidays.t will fail some unit tests on Sundays (1.81 KB, patch)
2014-10-21 21:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2014-10-20 13:03:51 UTC
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.
Comment 1 Kyle M Hall 2014-10-20 13:05:20 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2014-10-20 13:08:49 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-21 21:26:15 UTC
Created attachment 32567 [details] [review]
[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... :)
Comment 4 Tomás Cohen Arazi 2014-10-22 00:12:48 UTC
Patch pushed to master.

Thanks Kyle!