Bugzilla – Attachment 106343 Details for
Bug 25882
Elasticsearch - Advanced search itemtype limits are being double quoted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25882: Unit test
Bug-25882-Unit-test.patch (text/plain), 1.59 KB, created by
Alex Arnaud
on 2020-06-26 14:58:51 UTC
(
hide
)
Description:
Bug 25882: Unit test
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2020-06-26 14:58:51 UTC
Size:
1.59 KB
patch
obsolete
>From 94e6831fb3dee0a838bbfa7550f49f676e4cbca0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 26 Jun 2020 13:19:32 +0000 >Subject: [PATCH] Bug 25882: Unit test > >Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> >--- > t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index bf6d77d70e..c098d3e7a0 100644 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -216,7 +216,7 @@ subtest 'build_authorities_query_compat() tests' => sub { > }; > > subtest 'build_query tests' => sub { >- plan tests => 50; >+ plan tests => 51; > > my $qb; > >@@ -478,6 +478,13 @@ subtest 'build_query tests' => sub { > is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi'); > is($query_desc, 'title:"donald duck"', 'query desc ok'); > >+ ( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan', 'mc-itype,phr:BOOK', 'mc-itype,phr:CD'] ); >+ is( >+ $query->{query}{query_string}{query}, >+ '(title:"donald duck") AND (author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))', >+ "Limits quoted correctly when passed as phrase" >+ ); >+ > # Scan queries > ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['new'], ['au'], undef, undef, 1 ); > is( >-- >2.11.0
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 25882
:
106338
|
106339
|
106342
|
106343
|
106344
|
108067
|
108068