Bugzilla – Attachment 124760 Details for
Bug 24720
Remove special characters from beginning of sort fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24720: Add test
Bug-24720-Add-test.patch (text/plain), 2.64 KB, created by
David Gustafsson
on 2021-09-10 13:10:00 UTC
(
hide
)
Description:
Bug 24720: Add test
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2021-09-10 13:10:00 UTC
Size:
2.64 KB
patch
obsolete
>From c873d58ee44bbb3ee6ce7d96a4a80a8f71d86b0c Mon Sep 17 00:00:00 2001 >From: David Gustafsson <glasklas@gmail.com> >Date: Fri, 10 Sep 2021 15:07:47 +0200 >Subject: [PATCH] Bug 24720: Add test > >--- > .../Koha/SearchEngine/Elasticsearch.t | 20 +++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >index 471baf34e1..d3553e80d9 100644 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >@@ -122,7 +122,7 @@ subtest 'get_elasticsearch_mappings() tests' => sub { > > subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub { > >- plan tests => 53; >+ plan tests => 54; > > t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); > t::lib::Mocks::mock_preference('ElasticsearchMARCFormat', 'ISO2709'); >@@ -218,6 +218,16 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' > marc_type => 'marc21', > marc_field => '245', > }, >+ { >+ name => 'title_sort', >+ type => 'string', >+ facet => 0, >+ suggestible => 0, >+ searchable => 0, >+ sort => 1, >+ marc_type => 'marc21', >+ marc_field => '246a', >+ }, > { > name => 'sum_item_price', > type => 'sum', >@@ -325,7 +335,7 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' > MARC::Field->new('210', '', '', a => 'Title 1'), > MARC::Field->new('240', '', '4', a => 'The uniform title with nonfiling indicator'), > MARC::Field->new('245', '', '', a => 'Title:', b => 'first record'), >- MARC::Field->new('999', '', '', c => '1234567'), >+ MARC::Field->new('246', '', '', a => '#$[Title!'), > # ' ' for testing trimming of white space in boolean value callback: > MARC::Field->new('952', '', '', 0 => ' ', g => '123.30', o => $callno, l => 3), > MARC::Field->new('952', '', '', 0 => 0, g => '127.20', o => $callno2, l => 2), >@@ -460,6 +470,12 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' > 'First document uniform_title__sort field should contain the title with the first four initial characters removed' > ); > >+ is( >+ $docs->[0]->{title_sort__sort}[0], >+ 'Title!', >+ 'First document title_sort should have initial non word characters stripped', >+ ); >+ > # Second record: > > is(scalar @{$docs->[1]->{author}}, 1, 'Second document author field should contain one value'); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24720
:
99556
|
111567
|
124759
|
124760
|
125209
|
125210
|
162674
|
171988
|
171989