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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t (-2 / +18 lines)
Lines 187-193 subtest 'get_elasticsearch_mappings() tests' => sub { Link Here
187
187
188
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
188
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
189
189
190
    plan tests => 70;
190
    plan tests => 71;
191
191
192
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
192
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
193
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
193
    t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709');
Lines 294-299 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
294
            marc_type => 'marc21',
294
            marc_type => 'marc21',
295
            marc_field => '245',
295
            marc_field => '245',
296
        },
296
        },
297
        {
298
            name => 'title_sort',
299
            type => 'string',
300
            facet => 0,
301
            suggestible => 0,
302
            searchable => 0,
303
            sort => 1,
304
            marc_type => 'marc21',
305
            marc_field => '246a',
306
        },
297
        {
307
        {
298
            name => 'sum_item_price',
308
            name => 'sum_item_price',
299
            type => 'sum',
309
            type => 'sum',
Lines 447-452 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
447
        MARC::Field->new('650', '', '', a => 'Heading', z => 'Geohead', v => 'Formhead'),
457
        MARC::Field->new('650', '', '', a => 'Heading', z => 'Geohead', v => 'Formhead'),
448
        MARC::Field->new('650', '', '', a => 'Heading', x => 'Gensubhead', z => 'Geohead'),
458
        MARC::Field->new('650', '', '', a => 'Heading', x => 'Gensubhead', z => 'Geohead'),
449
        MARC::Field->new('999', '', '', c => '1234567'),
459
        MARC::Field->new('999', '', '', c => '1234567'),
460
        MARC::Field->new('246', '', '', a => '#$[Title!'),
450
        # '  ' for testing trimming of white space in boolean value callback:
461
        # '  ' for testing trimming of white space in boolean value callback:
451
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
462
        MARC::Field->new('952', '', '', 0 => '  ', g => '123.30', o => $callno, l => 3),
452
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
463
        MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2),
Lines 630-635 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
630
      'First document copydate field should be set correctly'
641
      'First document copydate field should be set correctly'
631
    );
642
    );
632
643
644
    is(
645
        $docs->[0]->{title_sort__sort}[0],
646
        'Title!',
647
        'First document title_sort should have initial non word characters stripped',
648
    );
649
633
    # Second record:
650
    # Second record:
634
651
635
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
652
    is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value');
636
- 

Return to bug 24720