Bug 20912: (QA follow-up) Fix number of tests and correct typos
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 28 Oct 2018 17:06:33 +0000 (17:06 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 7 Mar 2019 17:27:36 +0000 (17:27 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

t/db_dependent/Circulation.t
t/db_dependent/Koha/ItemTypes.t

index d9b6338..6b5d14b 100755 (executable)
@@ -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;
@@ -3057,22 +3057,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();
 
@@ -3084,11 +3084,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();
 
index 34ab094..21f870d 100755 (executable)
@@ -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" );
 
 };