Bug 9078 - fixing exceptions broke tests
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 21 Nov 2012 15:54:46 +0000 (12:54 -0300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 22 Nov 2012 14:27:46 +0000 (09:27 -0500)
Fixing the holiday exceptions arised a problem with how the test data was constructed.
This made several tests fail.

This patch fixes the add_holiday function. Tests should pass now.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Koha/Calendar.pm

index ee63e73..90069b6 100644 (file)
@@ -329,9 +329,9 @@ sub clear_weekly_closed_days {
 sub add_holiday {
     my $self = shift;
     my $new_dt = shift;
-    my @dt = $self->{exception_holidays}->as_list;
+    my @dt = $self->{single_holidays}->as_list;
     push @dt, $new_dt;
-    $self->{exception_holidays} =
+    $self->{single_holidays} =
       DateTime::Set->from_datetimes( dates => \@dt );
 
     return;