From 6ed0e29294858a5f25b14e52b2de6fc87c221ae2 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 28 Oct 2018 17:06:33 +0000 Subject: [PATCH] Bug 20912: (QA follow-up) Fix number of tests and correct typos Signed-off-by: Martin Renvoize --- t/db_dependent/Circulation.t | 14 +++++++------- t/db_dependent/Koha/ItemTypes.t | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 0f25c98fc3..82618209ff 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -18,7 +18,7 @@ use Modern::Perl; use utf8; -use Test::More tests => 124; +use Test::More tests => 125; use Test::MockModule; use Data::Dumper; @@ -3044,22 +3044,22 @@ subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { 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(); @@ -3071,11 +3071,11 @@ subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { ); $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(); diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t index 34ab094c9f..21f870d205 100755 --- a/t/db_dependent/Koha/ItemTypes.t +++ b/t/db_dependent/Koha/ItemTypes.t @@ -171,11 +171,11 @@ subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { 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( @@ -184,7 +184,7 @@ subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { 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" ); }; -- 2.20.1