Lines 81-87
subtest 'json2marc' => sub {
Link Here
|
81 |
}; |
81 |
}; |
82 |
|
82 |
|
83 |
subtest 'build_query tests' => sub { |
83 |
subtest 'build_query tests' => sub { |
84 |
plan tests => 20; |
84 |
plan tests => 23; |
85 |
|
85 |
|
86 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
86 |
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); |
87 |
my $query = $builder->build_query(); |
87 |
my $query = $builder->build_query(); |
Lines 186-191
subtest 'build_query tests' => sub {
Link Here
|
186 |
"query of specific field including hyphen and not quoted is truncated" |
186 |
"query of specific field including hyphen and not quoted is truncated" |
187 |
); |
187 |
); |
188 |
|
188 |
|
|
|
189 |
( undef, $query ) = $builder->build_query_compat( undef, ['Local-number.raw:123456'] ); |
190 |
is( |
191 |
$query->{query}{query_string}{query}, |
192 |
'(Local-number.raw:123456*)', |
193 |
"query of specific field including period and not quoted is truncated" |
194 |
); |
195 |
|
196 |
( undef, $query ) = $builder->build_query_compat( undef, ['Local-number.raw:"123456"'] ); |
197 |
is( |
198 |
$query->{query}{query_string}{query}, |
199 |
'(Local-number.raw:"123456")', |
200 |
"query of specific field including period and quoted is not truncated" |
201 |
); |
202 |
|
203 |
( undef, $query ) = $builder->build_query_compat( undef, ['J.R.R'] ); |
204 |
is( |
205 |
$query->{query}{query_string}{query}, |
206 |
'(J.R.R*)', |
207 |
"query including period is truncated but not split at periods" |
208 |
); |
209 |
|
189 |
( undef, $query ) = $builder->build_query_compat( undef, ['title:"donald duck"'] ); |
210 |
( undef, $query ) = $builder->build_query_compat( undef, ['title:"donald duck"'] ); |
190 |
is( |
211 |
is( |
191 |
$query->{query}{query_string}{query}, |
212 |
$query->{query}{query_string}{query}, |
192 |
- |
|
|