|
Lines 92-98
subtest 'json2marc' => sub {
Link Here
|
| 92 |
}; |
92 |
}; |
| 93 |
|
93 |
|
| 94 |
subtest 'build_query tests' => sub { |
94 |
subtest 'build_query tests' => sub { |
| 95 |
plan tests => 23; |
95 |
plan tests => 24; |
| 96 |
|
96 |
|
| 97 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
97 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
| 98 |
my $query = $builder->build_query(); |
98 |
my $query = $builder->build_query(); |
|
Lines 232-243
subtest 'build_query tests' => sub {
Link Here
|
| 232 |
"query of specific field is added AND suppress:0" |
232 |
"query of specific field is added AND suppress:0" |
| 233 |
); |
233 |
); |
| 234 |
|
234 |
|
| 235 |
( undef, $query ) = $builder->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 0 } ); |
235 |
my ($simple_query, $query_cgi); |
|
|
236 |
( undef, $query, $simple_query, $query_cgi ) = $builder->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 0 } ); |
| 236 |
is( |
237 |
is( |
| 237 |
$query->{query}{query_string}{query}, |
238 |
$query->{query}{query_string}{query}, |
| 238 |
'(title:"donald duck")', |
239 |
'(title:"donald duck")', |
| 239 |
"query of specific field is not added AND suppress:0" |
240 |
"query of specific field is not added AND suppress:0" |
| 240 |
); |
241 |
); |
|
|
242 |
is($query_cgi, 'q=title%3A%22donald%20duck%22', 'query cgi'); |
| 241 |
}; |
243 |
}; |
| 242 |
|
244 |
|
| 243 |
subtest "_convert_sort_fields" => sub { |
245 |
subtest "_convert_sort_fields" => sub { |
| 244 |
- |
|
|