|
Lines 219-225
subtest 'build_authorities_query_compat() tests' => sub {
Link Here
|
| 219 |
}; |
219 |
}; |
| 220 |
|
220 |
|
| 221 |
subtest 'build_query tests' => sub { |
221 |
subtest 'build_query tests' => sub { |
| 222 |
plan tests => 58; |
222 |
plan tests => 60; |
| 223 |
|
223 |
|
| 224 |
my $qb; |
224 |
my $qb; |
| 225 |
|
225 |
|
|
Lines 379-384
subtest 'build_query tests' => sub {
Link Here
|
| 379 |
"query with quotes is unaltered when QueryAutoTruncate is enabled" |
379 |
"query with quotes is unaltered when QueryAutoTruncate is enabled" |
| 380 |
); |
380 |
); |
| 381 |
|
381 |
|
|
|
382 |
( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'], undef, ['component_records'] ); |
| 383 |
is( |
| 384 |
$query->{query}{query_string}{query}, |
| 385 |
'("donald duck") AND (bib-level:a OR bib-level:b)', |
| 386 |
"Component records limit is handled properly" |
| 387 |
); |
| 388 |
|
| 389 |
( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'], undef, ['exclude_component_records'] ); |
| 390 |
is( |
| 391 |
$query->{query}{query_string}{query}, |
| 392 |
'("donald duck") AND NOT (bib-level:a OR bib-level:b)', |
| 393 |
"Host records limit is handled properly" |
| 394 |
); |
| 382 |
|
395 |
|
| 383 |
( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck" and "the mouse"'] ); |
396 |
( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck" and "the mouse"'] ); |
| 384 |
is( |
397 |
is( |
| 385 |
- |
|
|