Bugzilla – Attachment 108067 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.64 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-08-11 13:43:03 UTC
(
hide
)
Description:
Bug 25882: Unit test
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-08-11 13:43:03 UTC
Size:
1.64 KB
patch
obsolete
>From aeeaef3430818f91ed442ef48d7acd66fd0c83dc 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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../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 a9d886e7bf..1266da5ffe 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 => 52; >+ plan tests => 53; > > my $qb; > >@@ -481,6 +481,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.28.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