Bugzilla – Attachment 69094 Details for
Bug 19580
Elasticsearch: QueryAutoTruncate exclude period as splitting character in autotruncation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19580: Unit tests
Bug-19580-Unit-tests.patch (text/plain), 1.97 KB, created by
David Bourgault
on 2017-11-10 21:06:27 UTC
(
hide
)
Description:
Bug 19580: Unit tests
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-10 21:06:27 UTC
Size:
1.97 KB
patch
obsolete
>From 6cd91d2146ea9c38947befe161d922b232a10275 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 4 Nov 2017 01:01:20 +0000 >Subject: [PATCH] Bug 19580: Unit tests > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> >--- > .../Koha_SearchEngine_Elasticsearch_Search.t | 23 +++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t b/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >index a167f5d..865a6ce 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 => 20; >+ plan tests => 23; > > t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); > my $query = $builder->build_query(); >@@ -186,6 +186,27 @@ subtest 'build_query tests' => sub { > "query of specific field including hyphen and not quoted is truncated" > ); > >+ ( undef, $query ) = $builder->build_query_compat( undef, ['Local-number.raw:123456'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(Local-number.raw:123456*)', >+ "query of specific field including period and not quoted is truncated" >+ ); >+ >+ ( undef, $query ) = $builder->build_query_compat( undef, ['Local-number.raw:"123456"'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(Local-number.raw:"123456")', >+ "query of specific field including period and quoted is not truncated" >+ ); >+ >+ ( undef, $query ) = $builder->build_query_compat( undef, ['J.R.R'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(J.R.R*)', >+ "query including period is truncated but not split at periods" >+ ); >+ > ( 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 19580
:
68942
|
68943
|
69094
|
69095
|
70455
|
70456