Bug 25882: Unit test
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
70ff3bafa0
commit
1a2d7f1eac
1 changed files with 8 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue