Bug 32208: Extend Auth.t
[koha-ffzg.git] / t / Labels_split_lccn.t
index 4034e21..baca48c 100755 (executable)
@@ -20,6 +20,7 @@
 use strict;
 use warnings;
 
+use C4::ClassSplitRoutine::LCC qw( split_callnumber );
 use Test::More;
 
 BEGIN {
@@ -39,7 +40,7 @@ BEGIN {
     }
     my $test_num = 1;
     foreach (keys(%$lccns)) {
-        my $split_num += scalar(@{$lccns->{$_}});
+        my $split_num = scalar(@{$lccns->{$_}});
         $test_num += 2 * $split_num;
         $test_num += 4;
     }
@@ -52,7 +53,7 @@ foreach my $lccn (sort keys %$lccns) {
     my (@parts, @expected);
     ok($lccn, "lccn: $lccn");
     ok(@expected = @{$lccns->{$lccn}}, "split expected to produce " . scalar(@expected) . " pieces");
-    ok(@parts = C4::Labels::Label::_split_lccn($lccn), "C4::Labels::Label::_split_lccn($lccn)");
+    ok(@parts = C4::ClassSplitRoutine::LCC::split_callnumber($lccn), "split LCC ($lccn)");
     ok(scalar(@expected) == scalar(@parts), sprintf("%d of %d pieces produced", scalar(@parts), scalar(@expected)));
     my $i = 0;
     foreach my $unit (@expected) {