diff --git a/t/db_dependent/AuthorisedValues.t b/t/db_dependent/AuthorisedValues.t index e16f1faa89..d39d13170c 100755 --- a/t/db_dependent/AuthorisedValues.t +++ b/t/db_dependent/AuthorisedValues.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use Modern::Perl; -use Test::More tests => 17; +use Test::More tests => 16; use Try::Tiny; use t::lib::TestBuilder; @@ -137,8 +137,11 @@ is( @$limits, 2, 'library_limits functions correctly both as setter and getter' my @categories = Koha::AuthorisedValues->new->categories; is( @categories, @existing_categories+3, 'There should have 3 categories inserted' ); -is( $categories[0], $av4->category, 'The first category should be correct (ordered by category name)' ); -is( $categories[1], $av1->category, 'The second category should be correct (ordered by category name)' ); +is_deeply( + \@categories, + [ sort { uc $a cmp uc $b } @categories ], + 'categories must be ordered by category names' +); subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { plan tests => 5;