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 => 71; |
190 |
plan tests => 72; |
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 469-475
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
469 |
MARC::Field->new('008', '901111s19uu xxk|||| |00| ||eng c'), |
469 |
MARC::Field->new('008', '901111s19uu xxk|||| |00| ||eng c'), |
470 |
MARC::Field->new('100', '', '', a => 'Author 2'), |
470 |
MARC::Field->new('100', '', '', a => 'Author 2'), |
471 |
# MARC::Field->new('210', '', '', a => 'Title 2'), |
471 |
# MARC::Field->new('210', '', '', a => 'Title 2'), |
472 |
# MARC::Field->new('245', '', '', a => 'Title: second record'), |
472 |
MARC::Field->new('246', '', '', a => '!!!'), |
473 |
MARC::Field->new('260', '', '', a => 'New York :', b => 'Ace ,', c => '1963-2003'), |
473 |
MARC::Field->new('260', '', '', a => 'New York :', b => 'Ace ,', c => '1963-2003'), |
474 |
MARC::Field->new('999', '', '', c => '1234568'), |
474 |
MARC::Field->new('999', '', '', c => '1234568'), |
475 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno), |
475 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno), |
Lines 648-653
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
648 |
); |
648 |
); |
649 |
|
649 |
|
650 |
# Second record: |
650 |
# Second record: |
|
|
651 |
|
652 |
is( |
653 |
$docs->[1]->{title_sort__sort}[0], |
654 |
'!!!', |
655 |
'Second document title_sort should have been left as is as only contains non word characters', |
656 |
); |
651 |
|
657 |
|
652 |
is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value'); |
658 |
is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value'); |
653 |
is_deeply($docs->[1]->{author}, ['Author 2'], 'Second document author field should be set correctly'); |
659 |
is_deeply($docs->[1]->{author}, ['Author 2'], 'Second document author field should be set correctly'); |
654 |
- |
|
|