|
Lines 211-217
subtest 'get_elasticsearch_mappings() tests' => sub {
Link Here
|
| 211 |
|
211 |
|
| 212 |
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub { |
212 |
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub { |
| 213 |
|
213 |
|
| 214 |
plan tests => 72; |
214 |
plan tests => 73; |
| 215 |
|
215 |
|
| 216 |
t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); |
216 |
t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); |
| 217 |
t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' ); |
217 |
t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' ); |
|
Lines 500-505
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
| 500 |
|
500 |
|
| 501 |
# MARC::Field->new('210', '', '', a => 'Title 2'), |
501 |
# MARC::Field->new('210', '', '', a => 'Title 2'), |
| 502 |
# MARC::Field->new('245', '', '', a => 'Title: second record'), |
502 |
# MARC::Field->new('245', '', '', a => 'Title: second record'), |
|
|
503 |
MARC::Field->new( '246', '', '', a => '!!!' ), |
| 503 |
MARC::Field->new( '260', '', '', a => 'New York :', b => 'Ace ,', c => '1963-2003' ), |
504 |
MARC::Field->new( '260', '', '', a => 'New York :', b => 'Ace ,', c => '1963-2003' ), |
| 504 |
MARC::Field->new( '999', '', '', c => '1234568' ), |
505 |
MARC::Field->new( '999', '', '', c => '1234568' ), |
| 505 |
MARC::Field->new( '952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno ), |
506 |
MARC::Field->new( '952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno ), |
|
Lines 714-720
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
| 714 |
|
715 |
|
| 715 |
# Second record: |
716 |
# Second record: |
| 716 |
|
717 |
|
| 717 |
is( scalar @{ $docs->[1]->{author} }, 1, 'Second document author field should contain one value' ); |
718 |
is( |
|
|
719 |
$docs->[1]->{title_sort__sort}[0], |
| 720 |
'!!!', |
| 721 |
'Second document title_sort should have been left as is as only contains non word characters', |
| 722 |
); |
| 723 |
|
| 724 |
is( scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value' ); |
| 718 |
is_deeply( $docs->[1]->{author}, ['Author 2'], 'Second document author field should be set correctly' ); |
725 |
is_deeply( $docs->[1]->{author}, ['Author 2'], 'Second document author field should be set correctly' ); |
| 719 |
|
726 |
|
| 720 |
is( |
727 |
is( |
| 721 |
- |
|
|