@@ -, +, @@ # Failed test 'The second category should be correct (ordered by category name)' # at t/db_dependent/AuthorisedValues.t line 141. # got: 'AR_CANCELLATION' # expected: 'av_for_testing' --- t/db_dependent/AuthorisedValues.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/t/db_dependent/AuthorisedValues.t +++ a/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; --