Bugzilla – Attachment 68924 Details for
Bug 19559
Elasticsearch QueryAutoTruncate truncate field names with hyphens if data is quoted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19559 - Unit tests
Bug-19559---Unit-tests.patch (text/plain), 1.69 KB, created by
David Bourgault
on 2017-11-03 17:57:47 UTC
(
hide
)
Description:
Bug 19559 - Unit tests
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-03 17:57:47 UTC
Size:
1.69 KB
patch
obsolete
>From 90638cac2bb29cb8c8c607760538c11f8463030e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 1 Nov 2017 15:46:59 +0000 >Subject: [PATCH] Bug 19559 - Unit tests > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> >--- > t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t b/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >index b96a8b3..a167f5d 100644 >--- a/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >+++ b/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >@@ -81,7 +81,7 @@ subtest 'json2marc' => sub { > }; > > subtest 'build_query tests' => sub { >- plan tests => 18; >+ plan tests => 20; > > t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); > my $query = $builder->build_query(); >@@ -172,6 +172,20 @@ subtest 'build_query tests' => sub { > "query of specific field is truncated" > ); > >+ ( undef, $query ) = $builder->build_query_compat( undef, ['Local-number:"123456"'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(Local-number:"123456")', >+ "query of specific field including hyphen and quoted is not truncated" >+ ); >+ >+ ( undef, $query ) = $builder->build_query_compat( undef, ['Local-number:123456'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(Local-number:123456*)', >+ "query of specific field including hyphen and not quoted is truncated" >+ ); >+ > ( undef, $query ) = $builder->build_query_compat( undef, ['title:"donald duck"'] ); > is( > $query->{query}{query_string}{query}, >-- >2.7.4
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 19559
:
68881
|
68882
|
68924
|
68925
|
69075
|
69076