Bug 27944: Fix t/db_dependent/AuthorisedValues.t

#   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'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-10-06 11:42:48 +02:00
parent bebe7a1c10
commit 0c755efd1f

View file

@ -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;