Bugzilla – Attachment 68942 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.91 KB, created by
Nick Clemens (kidclamp)
on 2017-11-04 01:31:45 UTC
(
hide
)
Description:
Bug 19580: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-11-04 01:31:45 UTC
Size:
1.91 KB
patch
obsolete
>From f13604f6485743c332c9440ec316534d3fc41207 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 > >--- > .../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.1.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