Bugzilla – Attachment 64999 Details for
Bug 16976
Authorities searches with double quotes gives ZOOM error 20003
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16976 - Unit tests
Bug-16976---Unit-tests.patch (text/plain), 2.32 KB, created by
Nick Clemens (kidclamp)
on 2017-07-11 14:03:55 UTC
(
hide
)
Description:
Bug 16976 - Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-07-11 14:03:55 UTC
Size:
2.32 KB
patch
obsolete
>From 7d0fbcdcbc76974b48744cfbc81be4e2bb514e98 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Jul 2017 17:55:50 +0000 >Subject: [PATCH] Bug 16976 - Unit tests > >--- > t/Search/Zebra/QueryBuilder.t | 22 ++++++++++++++++------ > 1 file changed, 16 insertions(+), 6 deletions(-) > >diff --git a/t/Search/Zebra/QueryBuilder.t b/t/Search/Zebra/QueryBuilder.t >index 42df1c5..9e130d3 100644 >--- a/t/Search/Zebra/QueryBuilder.t >+++ b/t/Search/Zebra/QueryBuilder.t >@@ -8,7 +8,10 @@ use_ok('Koha::SearchEngine::Zebra::QueryBuilder'); > subtest 'build_authorities_query' => sub { > plan tests => 2; > >- my @test_search = (['mainmainentry'],['and'],[''],['contains'],['any'],'','HeadingAsc'); >+ my @test_search = ( >+ ['mainmainentry'], ['and'], [''], ['contains'], ['any'], '', >+ 'HeadingAsc' >+ ); > my $expected_result = { > marclist => ['mainmainentry'], > and_or => ['and'], >@@ -18,12 +21,19 @@ subtest 'build_authorities_query' => sub { > authtypecode => '', > orderby => 'HeadingAsc', > }; >- my $built_search = Koha::SearchEngine::Zebra::QueryBuilder->build_authorities_query(@test_search); >- is_deeply( $built_search, $expected_result, "We are simply hashifying our array of refs/values, should otherwise not be altered" ); >+ my $built_search = >+ Koha::SearchEngine::Zebra::QueryBuilder->build_authorities_query( @test_search ); >+ is_deeply( >+ $built_search, $expected_result, >+ "We are simply hashifying our array of refs/values, should otherwise not be altered" >+ ); > $expected_result->{value} = ['"any"']; > $test_search[4] = ['"any"']; >- $built_search = Koha::SearchEngine::Zebra::QueryBuilder->build_authorities_query(@test_search); >- warn Data::Dumper::Dumper( $built_search, $expected_result ); >- is_deeply( $built_search, $expected_result, "The same should hold true if the search contains double quotes which will be escaped during searching by search_auth_compat subroutine" ); >+ $built_search = >+ Koha::SearchEngine::Zebra::QueryBuilder->build_authorities_query( @test_search ); >+ is_deeply( >+ $built_search, $expected_result, >+ "The same should hold true if the search contains double quotes which will be escaped during searching by search_auth_compat subroutine" >+ ); > }; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16976
:
63957
|
63963
|
64382
|
64384
|
64655
|
64923
|
64998
|
64999
|
65901
|
65902
|
65903
|
65904
|
65905
|
66017
|
66018