Bugzilla – Attachment 108211 Details for
Bug 25872
Advanced search on OPAC with limiter but no search term fails when re-sorted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25872: Unit tests
Bug-25872-Unit-tests.patch (text/plain), 1.73 KB, created by
ByWater Sandboxes
on 2020-08-13 18:33:34 UTC
(
hide
)
Description:
Bug 25872: Unit tests
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-08-13 18:33:34 UTC
Size:
1.73 KB
patch
obsolete
>From abb190d3dcd5c54fb0468c5db917d467ecfde0b2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 13 Aug 2020 12:55:21 +0000 >Subject: [PATCH] Bug 25872: Unit tests > >Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> >--- > t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index 1266da5ffe..e62e57f4e4 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 => 53; >+ plan tests => 56; > > my $qb; > >@@ -524,6 +524,12 @@ subtest 'build_query tests' => sub { > ); > is($query_cgi, 'idx=&q=new&scan=1', 'query cgi'); > is($query_desc, 'new', 'query desc ok'); >+ >+ my( $limit, $limit_cgi, $limit_desc ); >+ ( undef, $query, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc ) = $qb->build_query_compat( ['AND'], ['kw:""'], undef, ['author:Dillinger Escaplan', 'mc-itype,phr:BOOK', 'mc-itype,phr:CD'] ); >+ is( $limit, '(author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))', "Limit formed correctly when no search terms"); >+ is( $limit_cgi,'&limit=author%3ADillinger%20Escaplan&limit=mc-itype%2Cphr%3ABOOK&limit=mc-itype%2Cphr%3ACD', "Limit CGI formed correctly when no search terms"); >+ is( $limit_desc,'(author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))',"Limit desc formed correctly when no search terms"); > }; > > >-- >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 25872
:
108176
|
108177
|
108211
|
108212
|
108257
|
108258
|
108507