Bug 19559: Add tests
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 26be355fe8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
a91e24454d
commit
afeef629f5
|
|
@ -96,7 +96,7 @@ subtest 'json2marc' => sub {
|
|||
};
|
||||
|
||||
subtest 'build_query tests' => sub {
|
||||
plan tests => 16;
|
||||
plan tests => 18;
|
||||
|
||||
t::lib::Mocks::mock_preference('DisplayLibraryFacets','both');
|
||||
my $query = $builder->build_query();
|
||||
|
|
@ -187,6 +187,20 @@ subtest 'build_query tests' => sub {
|
|||
"query of specific field is truncated"
|
||||
);
|
||||
|
||||
( undef, $query ) = $builder->build_query_compat( undef, ['Local-number:"123456"'] );
|
||||
is(
|
||||
$query->{query}{query_string}{query},
|
||||
'(Local-number:"123456")',
|
||||
"query of specific field including hyphen and quoted is not truncated"
|
||||
);
|
||||
|
||||
( undef, $query ) = $builder->build_query_compat( undef, ['Local-number:123456'] );
|
||||
is(
|
||||
$query->{query}{query_string}{query},
|
||||
'(Local-number:123456*)',
|
||||
"query of specific field including hyphen and not quoted is truncated"
|
||||
);
|
||||
|
||||
( undef, $query ) = $builder->build_query_compat( undef, ['title:"donald duck"'] );
|
||||
is(
|
||||
$query->{query}{query_string}{query},
|
||||
|
|
|
|||
Loading…
Reference in New Issue