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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t (-3 / +18 lines)
Lines 122-128 subtest 'get_elasticsearch_mappings() tests' => sub { Link Here
122
122
123
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
123
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
124
124
125
    plan tests => 53;
125
    plan tests => 54;
126
126
127
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
127
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
128
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
128
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
Lines 218-223 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
218
            marc_type => 'marc21',
218
            marc_type => 'marc21',
219
            marc_field => '245',
219
            marc_field => '245',
220
        },
220
        },
221
        {
222
            name => 'title_sort',
223
            type => 'string',
224
            facet => 0,
225
            suggestible => 0,
226
            searchable => 0,
227
            sort => 1,
228
            marc_type => 'marc21',
229
            marc_field => '246a',
230
        },
221
        {
231
        {
222
            name => 'sum_item_price',
232
            name => 'sum_item_price',
223
            type => 'sum',
233
            type => 'sum',
Lines 325-331 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
325
        MARC::Field->new('210', '', '', a => 'Title 1'),
335
        MARC::Field->new('210', '', '', a => 'Title 1'),
326
        MARC::Field->new('240', '', '4', a => 'The uniform title with nonfiling indicator'),
336
        MARC::Field->new('240', '', '4', a => 'The uniform title with nonfiling indicator'),
327
        MARC::Field->new('245', '', '', a => 'Title:', b => 'first record'),
337
        MARC::Field->new('245', '', '', a => 'Title:', b => 'first record'),
328
        MARC::Field->new('999', '', '', c => '1234567'),
338
        MARC::Field->new('246', '', '', a => '#$[Title!'),
329
        # '  ' for testing trimming of white space in boolean value callback:
339
        # '  ' for testing trimming of white space in boolean value callback:
330
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
340
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
331
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
341
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
Lines 460-465 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
460
        'First document uniform_title__sort field should contain the title with the first four initial characters removed'
470
        'First document uniform_title__sort field should contain the title with the first four initial characters removed'
461
    );
471
    );
462
472
473
    is(
474
        $docs->[0]->{title_sort__sort}[0],
475
        'Title!',
476
        'First document title_sort should have initial non word characters stripped',
477
    );
478
463
    # Second record:
479
    # Second record:
464
480
465
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
481
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
466
- 

Return to bug 24720