View | Details | Raw Unified | Return to bug 23089
Collapse All | Expand All

(-)a/t/Koha/SearchEngine/Elasticsearch.t (-7 / +6 lines)
Lines 117-123 subtest 'get_elasticsearch_mappings() tests' => sub { Link Here
117
117
118
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
118
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
119
119
120
    plan tests => 51;
120
    plan tests => 52;
121
121
122
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
122
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
123
123
Lines 332-344 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
332
    is(scalar @{$docs->[0][1]->{title__sort}}, 1, 'First document title__sort field should have a single');
332
    is(scalar @{$docs->[0][1]->{title__sort}}, 1, 'First document title__sort field should have a single');
333
    is_deeply($docs->[0][1]->{title__sort}, ['Title: first record Title: first record'], 'First document title__sort field should be set correctly');
333
    is_deeply($docs->[0][1]->{title__sort}, ['Title: first record Title: first record'], 'First document title__sort field should be set correctly');
334
334
335
    is($docs->[0]->{issues}, 6, 'Issues field should be sum of the issues for each item');
335
    is($docs->[0][1]->{issues}, 6, 'Issues field should be sum of the issues for each item');
336
    is($docs->[0]->{issues__sort}, 6, 'Issues sort field should also be a sum of the issues');
336
    is($docs->[0][1]->{issues__sort}, 6, 'Issues sort field should also be a sum of the issues');
337
337
338
    is(scalar @{$docs->[0]->{title_wildcard}}, 2, 'First document title_wildcard field should have two values');
338
    is(scalar @{$docs->[0][1]->{title_wildcard}}, 2, 'First document title_wildcard field should have two values');
339
    is_deeply($docs->[0]->{title_wildcard}, ['Title:', 'first record'], 'First document title_wildcard field should be set correctly');
339
    is_deeply($docs->[0][1]->{title_wildcard}, ['Title:', 'first record'], 'First document title_wildcard field should be set correctly');
340
340
341
    is(scalar @{$docs->[0]->{author__suggestion}}, 2, 'First document author__suggestion field should contain two values');
341
    is(scalar @{$docs->[0][1]->{author__suggestion}}, 2, 'First document author__suggestion field should contain two values');
342
    is_deeply(
342
    is_deeply(
343
        $docs->[0][1]->{author__suggestion},
343
        $docs->[0][1]->{author__suggestion},
344
        [
344
        [
345
- 

Return to bug 23089