use Modern::Perl;
use utf8;
-use Test::More tests => 124;
+use Test::More tests => 125;
use Test::MockModule;
use Data::Dumper;
t::lib::Mocks::mock_preference('finesCalendar', 'ignoreCalendar');
my $issue = AddIssue( $patron->unblessed, $item->barcode, $dt_to, undef, $dt_from );
my $accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '7.000000', "Daily rental charge calulated correctly with finesCalendar = ignoreCalendar" );
+ is( $accountline->amount, '7.000000', "Daily rental charge calculated correctly with finesCalendar = ignoreCalendar" );
$accountline->delete();
AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to );
$accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '6.000000', "Daily rental charge calulated correctly with finesCalendar = ignoreCalendar, for renewal" );
+ is( $accountline->amount, '6.000000', "Daily rental charge calculated correctly with finesCalendar = ignoreCalendar, for renewal" );
$accountline->delete();
$issue->delete();
t::lib::Mocks::mock_preference('finesCalendar', 'noFinesWhenClosed');
$issue = AddIssue( $patron->unblessed, $item->barcode, $dt_to, undef, $dt_from );
$accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '7.000000', "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed" );
+ is( $accountline->amount, '7.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed" );
$accountline->delete();
AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to );
$accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '6.000000', "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed, for renewal" );
+ is( $accountline->amount, '6.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed, for renewal" );
$accountline->delete();
$issue->delete();
);
$issue = AddIssue( $patron->unblessed, $item->barcode, $dt_to, undef, $dt_from );
$accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '6.000000', "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays" );
+ is( $accountline->amount, '6.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays" );
$accountline->delete();
AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to );
$accountline = Koha::Account::Lines->find({ itemnumber => $item->id });
- is( $accountline->amount, '5.000000', "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays, for renewal" );
+ is( $accountline->amount, '5.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays, for renewal" );
$accountline->delete();
$issue->delete();
t::lib::Mocks::mock_preference('finesCalendar', 'ignoreCalendar');
my $charge = $itemtype->calc_rental_charge_daily( { from => $dt_from, to => $dt_to } );
- is( $charge, 7.00, "Daily rental charge calulated correctly with finesCalendar = ignoreCalendar" );
+ is( $charge, 7.00, "Daily rental charge calculated correctly with finesCalendar = ignoreCalendar" );
t::lib::Mocks::mock_preference('finesCalendar', 'noFinesWhenClosed');
$charge = $itemtype->calc_rental_charge_daily( { from => $dt_from, to => $dt_to } );
- is( $charge, 7.00, "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed" );
+ is( $charge, 7.00, "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed" );
my $calendar = C4::Calendar->new( branchcode => $library->id );
$calendar->insert_week_day_holiday(
description => 'Test holiday'
);
$charge = $itemtype->calc_rental_charge_daily( { from => $dt_from, to => $dt_to } );
- is( $charge, 6.00, "Daily rental charge calulated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays" );
+ is( $charge, 6.00, "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays" );
};