Bug 23204: Fix tests swapping fields (they are not ordered)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-03-27 16:36:08 +01:00 committed by Martin Renvoize
parent 2cf5ae07f1
commit 7d8ddfb675
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 12 additions and 12 deletions

View File

@ -95,19 +95,19 @@ is( $mappings->{biblios}{title}{facet_order}, undef, 'Facet order is undef');
is(scalar(@{ $mappings->{biblios}{title}{mappings} }), 3, 'Title has 3 mappings');
my $f247_map = $mappings->{biblios}{title}{mappings}[0];
is( $f247_map->{marc_field}, 247, 'First mapping is on field 247');
is( $f247_map->{marc_type}, 'marc21', 'First mapping is for marc21');
is( $f247_map->{facet}, '', 'First mapping facet is empty');
is( $f247_map->{suggestible}, '', 'First mapping is not suggestible');
is( $f247_map->{sort}, undef, 'First mapping is not sortable');
my $f212_map = $mappings->{biblios}{title}{mappings}[0];
is( $f212_map->{marc_field}, 212, 'First mapping is on field 212');
is( $f212_map->{marc_type}, 'marc21', 'First mapping is for marc21');
is( $f212_map->{facet}, '', 'First mapping facet is empty');
is( $f212_map->{suggestible}, '', 'First mapping is not suggestible');
is( $f212_map->{sort}, undef, 'First mapping is not sortable');
my $f212_map = $mappings->{biblios}{title}{mappings}[1];
is( $f212_map->{marc_field}, 212, 'Second mapping is on field 247');
is( $f212_map->{marc_type}, 'marc21', 'Second mapping is for marc21');
is( $f212_map->{facet}, '', 'Second mapping facet is empty');
is( $f212_map->{suggestible}, '', 'Second mapping is not suggestible');
is( $f212_map->{sort}, undef, 'Second mapping is not sortable');
my $f247_map = $mappings->{biblios}{title}{mappings}[1];
is( $f247_map->{marc_field}, 247, 'Second mapping is on field 247');
is( $f247_map->{marc_type}, 'marc21', 'Second mapping is for marc21');
is( $f247_map->{facet}, '', 'Second mapping facet is empty');
is( $f247_map->{suggestible}, '', 'Second mapping is not suggestible');
is( $f247_map->{sort}, undef, 'Second mapping is not sortable');
$mappings = Koha::SearchEngine::Elasticsearch::raw_elasticsearch_mappings('unimarc');