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:
parent
a52a9d7875
commit
2e9344d2e3
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Reference in New Issue