Bug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only

The tests are no longer relevant

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2024-05-08 14:35:11 +02:00 committed by Martin Renvoize
parent 26e7ed29af
commit 650065fcd2
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 20 deletions

View File

@ -219,7 +219,7 @@ subtest 'build_authorities_query_compat() tests' => sub {
};
subtest 'build_query tests' => sub {
plan tests => 63;
plan tests => 57;
my $qb;
@ -254,25 +254,6 @@ subtest 'build_query tests' => sub {
is( $query->{aggregations}{homebranch}{terms}{size}, 37,'we ask for the size as defined by the syspref FacetMaxCount for homebranch');
is( $query->{aggregations}{holdingbranch}{terms}{size}, 37,'we ask for the size as defined by the syspref FacetMaxCount for holdingbranch');
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both');
$query = $qb->build_query();
ok( defined $query->{aggregations}{homebranch},
'homebranch added to facets if DisplayLibraryFacets=both' );
ok( defined $query->{aggregations}{holdingbranch},
'holdingbranch added to facets if DisplayLibraryFacets=both' );
t::lib::Mocks::mock_preference('DisplayLibraryFacets','holding');
$query = $qb->build_query();
ok( !defined $query->{aggregations}{homebranch},
'homebranch not added to facets if DisplayLibraryFacets=holding' );
ok( defined $query->{aggregations}{holdingbranch},
'holdingbranch added to facets if DisplayLibraryFacets=holding' );
t::lib::Mocks::mock_preference('DisplayLibraryFacets','home');
$query = $qb->build_query();
ok( defined $query->{aggregations}{homebranch},
'homebranch added to facets if DisplayLibraryFacets=home' );
ok( !defined $query->{aggregations}{holdingbranch},
'holdingbranch not added to facets if DisplayLibraryFacets=home' );
t::lib::Mocks::mock_preference( 'QueryAutoTruncate', '' );
( undef, $query ) = $qb->build_query_compat( undef, ['donald duck'] );