X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fdb_dependent%2FTags.t;h=5612d3ac1ae99ed18b8c2bd10a512eaf55a79343;hb=01c7c2a12904fae5076914d839c5e829c54deb6f;hp=5359e30b98857cbaf8f39c3792bfcc4f6ebac36f;hpb=a8c5497b8da7de25b7c4787ee5540e4e1b48704d;p=koha.git diff --git a/t/db_dependent/Tags.t b/t/db_dependent/Tags.t index 5359e30b98..5612d3ac1a 100755 --- a/t/db_dependent/Tags.t +++ b/t/db_dependent/Tags.t @@ -6,16 +6,23 @@ use strict; use warnings; -use Test::More tests => 30; +use Test::More tests => 32; 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 -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 ($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');