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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t (-2 / +18 lines)
Lines 137-143 subtest 'get_elasticsearch_mappings() tests' => sub { Link Here
137
137
138
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
138
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
139
139
140
    plan tests => 63;
140
    plan tests => 64;
141
141
142
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
142
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
143
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
143
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
Lines 233-238 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
233
            marc_type => 'marc21',
233
            marc_type => 'marc21',
234
            marc_field => '245',
234
            marc_field => '245',
235
        },
235
        },
236
        {
237
            name => 'title_sort',
238
            type => 'string',
239
            facet => 0,
240
            suggestible => 0,
241
            searchable => 0,
242
            sort => 1,
243
            marc_type => 'marc21',
244
            marc_field => '246a',
245
        },
236
        {
246
        {
237
            name => 'sum_item_price',
247
            name => 'sum_item_price',
238
            type => 'sum',
248
            type => 'sum',
Lines 375-380 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
375
        MARC::Field->new('650', '', '', a => 'Heading', z => 'Geohead', v => 'Formhead'),
385
        MARC::Field->new('650', '', '', a => 'Heading', z => 'Geohead', v => 'Formhead'),
376
        MARC::Field->new('650', '', '', a => 'Heading', x => 'Gensubhead', z => 'Geohead'),
386
        MARC::Field->new('650', '', '', a => 'Heading', x => 'Gensubhead', z => 'Geohead'),
377
        MARC::Field->new('999', '', '', c => '1234567'),
387
        MARC::Field->new('999', '', '', c => '1234567'),
388
        MARC::Field->new('246', '', '', a => '#$[Title!'),
378
        # '  ' for testing trimming of white space in boolean value callback:
389
        # '  ' for testing trimming of white space in boolean value callback:
379
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
390
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
380
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
391
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
Lines 536-541 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
536
      'First document copydate field should be set correctly'
547
      'First document copydate field should be set correctly'
537
    );
548
    );
538
549
550
    is(
551
        $docs->[0]->{title_sort__sort}[0],
552
        'Title!',
553
        'First document title_sort should have initial non word characters stripped',
554
    );
555
539
    # Second record:
556
    # Second record:
540
557
541
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
558
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
542
- 

Return to bug 24720