aa4c6ff62f
CalcFine returned values that mismatched expectations in fines.pl. fines.pl refactored: added debugging, prevent needless recreation of Calendar objects by storing them in hash by branch. Still outstanding problems with fines, including the output of a field that has no other references in Koha (so is always undef) and the incorrect description of FinesMode. Calendar exported "new" erroneously. I also cleaned up the queries to avoid needlessly compiling additional statement handles. Please test and consider application to 3.0 maintenance. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
34 lines
805 B
Perl
34 lines
805 B
Perl
package KohaTest::Calendar;
|
|
use base qw( KohaTest );
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use C4::Calendar;
|
|
sub testing_class { 'C4::Calendar' };
|
|
|
|
|
|
sub methods : Test( 1 ) {
|
|
my $self = shift;
|
|
my @methods = qw( new
|
|
get_week_days_holidays
|
|
get_day_month_holidays
|
|
get_exception_holidays
|
|
get_single_holidays
|
|
insert_week_day_holiday
|
|
insert_day_month_holiday
|
|
insert_single_holiday
|
|
insert_exception_holiday
|
|
delete_holiday
|
|
isHoliday
|
|
addDate
|
|
daysBetween
|
|
);
|
|
|
|
can_ok( $self->testing_class, @methods );
|
|
}
|
|
|
|
1;
|
|
|