Bugzilla – Attachment 90903 Details for
Bug 22924
Elasticsearch, SysPref FacetMaxCount don't show more than 10 facets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22924: Unit tests
Bug-22924-Unit-tests.patch (text/plain), 1.52 KB, created by
Nick Clemens (kidclamp)
on 2019-06-21 11:42:47 UTC
(
hide
)
Description:
Bug 22924: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-06-21 11:42:47 UTC
Size:
1.52 KB
patch
obsolete
>From 3eeb2c5e684b4a10b88a75a899b7af5ee572516d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 21 Jun 2019 11:42:27 +0000 >Subject: [PATCH] Bug 22924: Unit tests > >--- > .../Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index df2f323383..935a2cade8 100644 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -169,7 +169,7 @@ subtest 'build_authorities_query_compat() tests' => sub { > }; > > subtest 'build_query tests' => sub { >- plan tests => 33; >+ plan tests => 35; > > my $qb; > >@@ -196,6 +196,16 @@ subtest 'build_query tests' => sub { > "sort parameter properly formed" > ); > >+ >+ t::lib::Mocks::mock_preference('FacetMaxCount','37'); >+ my %options; >+ $options{expanded_facet} = 'ccode'; >+ my $query = $qb->build_query('test', %options); >+ ok( defined $query->{aggregations}{ccode}{terms}{size}, >+ 'ccode facet gets a size parameter if "expanded_facet" passed' ); >+ is( $query->{aggregations}{ccode}{terms}{size}, 37, >+ 'ccode facet gets size matching FacetMaxCount if "expanded_facet" passed' ); >+ > t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); > $query = $qb->build_query(); > ok( defined $query->{aggregations}{homebranch}, >-- >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 22924
:
89852
|
90053
|
90341
|
90665
| 90903