[Koha-bugs] [Bug 8418] Koha::Calendar is_holiday ignores all user data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 13 12:15:31 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8418

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris at bigballofwax.co.nz

--- Comment #8 from Chris Cormack <chris at bigballofwax.co.nz> ---
The tests now fail

Before the patches
 perl t/Kalendar.t                            
1..9
ok 1 - use Koha::Calendar;
ok 2 - Calendar class returned isa Koha::Calendar
ok 3 - Sunday is a closed day
ok 4 - Monday is not a closed day
ok 5 - month/day closed day test
ok 6 - special closed day test
ok 7 - open day test
ok 8 - addDate skips closed Sunday
ok 9 - Negative call to addDate

Applying the first patch
perl t/Kalendar.t                                     
1..9
ok 1 - use Koha::Calendar;
ok 2 - Calendar class returned isa Koha::Calendar
ok 3 - Sunday is a closed day
ok 4 - Monday is not a closed day
not ok 5 - month/day closed day test
#   Failed test 'month/day closed day test'
#   at t/Kalendar.t line 54.
#          got: '0'
#     expected: '1'
ok 6 - special closed day test
ok 7 - open day test
ok 8 - addDate skips closed Sunday
ok 9 - Negative call to addDate
# Looks like you failed 1 test of 9.


Applying the 2nd patch
Still failing 5

Applying the final one
 perl t/Kalendar.t                                     
1..9
ok 1 - use Koha::Calendar;
ok 2 - Calendar class returned isa Koha::Calendar
ok 3 - Sunday is a closed day
ok 4 - Monday is not a closed day
not ok 5 - month/day closed day test
#   Failed test 'month/day closed day test'
#   at t/Kalendar.t line 54.
#          got: '0'
#     expected: '1'
not ok 6 - special closed day test
#   Failed test 'special closed day test'
#   at t/Kalendar.t line 55.
#          got: '0'
#     expected: '1'
ok 7 - open day test
ok 8 - addDate skips closed Sunday
ok 9 - Negative call to addDate
# Looks like you failed 2 tests of 9

I can fix the test for the first fail

By changing this
-    $self->{day_month_closed_days} = { 6 => { 16 => 1, } };
+    $self->{day_month_closed_days} = { 16 => { 6 => 1, } };


But the test still fails for special holidays, I think this is actually broken.

Also are we certain everywhere is specifying holidays as day month, not month
day as the test and code was before this change?

Its too late in the night for me to go much further with this, I hope someone
else has a chance to look at it

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list