Bug 27307: Unit test

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2020-12-24 14:04:17 +00:00 committed by Jonathan Druart
parent a52a9d7875
commit 2e9344d2e3
1 changed files with 8 additions and 1 deletions

View File

@ -216,7 +216,7 @@ subtest 'build_authorities_query_compat() tests' => sub {
};
subtest 'build_query tests' => sub {
plan tests => 56;
plan tests => 57;
my $qb;
@ -279,6 +279,13 @@ subtest 'build_query tests' => sub {
"query not altered if QueryAutoTruncate disabled"
);
( undef, $query ) = $qb->build_query_compat( undef, ['donald duck'], ['kw,phr'] );
is(
$query->{query}{query_string}{query},
'("donald duck")',
"keyword as phrase correctly quotes search term and strips index"
);
( undef, $query ) = $qb->build_query_compat( undef, ['donald duck'], ['title'] );
is(
$query->{query}{query_string}{query},