Bug 28445: Improve robustness of tests

* Libraries are ordered by name by default but if others have been added
the test may fail

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-10-06 15:45:17 +02:00
parent 30235697fe
commit cd7641b2c8
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ subtest 'authorised values' => sub {
subtest 'branches' => sub {
plan tests => 2;
my ( $subfield ) = grep { $_->{kohafield} eq 'items.homebranch' } @$subfields;
my $libraries = Koha::Libraries->search;
my $libraries = Koha::Libraries->search({}, { order_by => 'branchname' });
is_deeply(
$subfield->{marc_value}->{values},
[ $libraries->get_column('branchcode') ]