projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 19243: Fix tests for patron categories
[koha.git]
/
t
/
db_dependent
/
Tags.t
diff --git
a/t/db_dependent/Tags.t
b/t/db_dependent/Tags.t
index
5359e30
..
5612d3a
100755
(executable)
--- a/
t/db_dependent/Tags.t
+++ b/
t/db_dependent/Tags.t
@@
-6,16
+6,23
@@
use strict;
use warnings;
use strict;
use warnings;
-use Test::More tests => 3
0
;
+use Test::More tests => 3
2
;
BEGIN {
use_ok('C4::Tags');
}
BEGIN {
use_ok('C4::Tags');
}
+# Check no tags case.
+my @tagsarray;
+my $tags = \@tagsarray;
+my ($min, $max) = C4::Tags::stratify_tags(0, $tags);
+is($min, 0, 'Empty array min');
+is($max, 0, 'Empty array max');
+
# Simple 'sequential 5' test
# Simple 'sequential 5' test
-
my
$tags = make_tags(1,2,3,4,5);
+$tags = make_tags(1,2,3,4,5);
my @strata = (0,1,2,3,4);
my @strata = (0,1,2,3,4);
-
my
($min, $max) = C4::Tags::stratify_tags(5, $tags);
+($min, $max) = C4::Tags::stratify_tags(5, $tags);
check_tag_strata($tags, \@strata, 'Sequential 5');
is($min, 0, 'Sequential 5 min');
is($max, 4, 'Sequential 5 max');
check_tag_strata($tags, \@strata, 'Sequential 5');
is($min, 0, 'Sequential 5 min');
is($max, 4, 'Sequential 5 max');