Lines 216-222
subtest 'build_authorities_query_compat() tests' => sub {
Link Here
|
216 |
}; |
216 |
}; |
217 |
|
217 |
|
218 |
subtest 'build_query tests' => sub { |
218 |
subtest 'build_query tests' => sub { |
219 |
plan tests => 50; |
219 |
plan tests => 51; |
220 |
|
220 |
|
221 |
my $qb; |
221 |
my $qb; |
222 |
|
222 |
|
Lines 244-252
subtest 'build_query tests' => sub {
Link Here
|
244 |
); |
244 |
); |
245 |
|
245 |
|
246 |
t::lib::Mocks::mock_preference('FacetMaxCount','37'); |
246 |
t::lib::Mocks::mock_preference('FacetMaxCount','37'); |
|
|
247 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
247 |
$query = $qb->build_query('test', %options); |
248 |
$query = $qb->build_query('test', %options); |
248 |
ok( defined $query->{aggregations}{ccode}{terms}{size},'we need to ask for a size or we get only 5 facet' ); |
249 |
ok( defined $query->{aggregations}{ccode}{terms}{size},'we need to ask for a size or we get only 5 facet' ); |
249 |
is( $query->{aggregations}{ccode}{terms}{size}, 37,'we ask for the size as defined by the syspref FacetMaxCount'); |
250 |
is( $query->{aggregations}{ccode}{terms}{size}, 37,'we ask for the size as defined by the syspref FacetMaxCount'); |
|
|
251 |
is( $query->{aggregations}{homebranch}{terms}{size}, 37,'we ask for the size as defined by the syspref FacetMaxCount fir homebranch'); |
250 |
|
252 |
|
251 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
253 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
252 |
$query = $qb->build_query(); |
254 |
$query = $qb->build_query(); |
253 |
- |
|
|