From 2ed5de93d9658c151505afd470d0f58ec0803679 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 25 Mar 2022 10:14:27 -1000 Subject: [PATCH] Bug 22605: (RM follow-up) Fix test suite See https://jenkins.koha-community.org/view/master/job/Koha_Master_D10/560/ Signed-off-by: Fridolin Somers --- t/Search.t | 12 ++++++------ t/Search/buildQuery.t | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/t/Search.t b/t/Search.t index 4cde2c3ddf..fb2bccbdd5 100755 --- a/t/Search.t +++ b/t/Search.t @@ -64,7 +64,7 @@ subtest "_build_initial_query tests" => sub { C4::Search::_build_initial_query($params); is( $query, "query operator parsed_operand", "\$query built correctly"); - is( $query_cgi, "query_cgi&op=%20operator%20&idx=index&q=original_operand", + is( $query_cgi, "query_cgi&op=operator&idx=index&q=original_operand", "\$query_cgi built correctly"); is( $query_desc, "query_desc operator index_plus original_operand", "\$query_desc build correctly"); @@ -89,7 +89,7 @@ subtest "_build_initial_query tests" => sub { C4::Search::_build_initial_query($params); is( $query, "query AND parsed_operand", "\$query built correctly (no operator)"); - is( $query_cgi, "query_cgi&op=%20AND%20&idx=index&q=original_operand", + is( $query_cgi, "query_cgi&op=AND&idx=index&q=original_operand", "\$query_cgi built correctly (no operator)"); is( $query_desc, "query_desc AND index_plus original_operand", "\$query_desc build correctly (no operator)"); @@ -112,11 +112,11 @@ subtest "_build_initial_query tests" => sub { ($query,$query_cgi,$query_desc,$previous_operand) = C4::Search::_build_initial_query($params); - is( $query, "queryparsed_operand", + is( $query, "query parsed_operand", "\$query built correctly (no previous operand)"); is( $query_cgi, "query_cgi&idx=index&q=original_operand", "\$query_cgi built correctly (no previous operand)"); - is( $query_desc, "query_descindex_plus original_operand", + is( $query_desc, "query_desc index_plus original_operand", "\$query_desc build correctly (no previous operand)"); is( $previous_operand, 1, "\$query build correctly (no previous operand)"); @@ -139,7 +139,7 @@ subtest "_build_initial_query tests" => sub { C4::Search::_build_initial_query($params); is( $query, "query operator parsed_operand", "\$query built correctly (no index passed)"); - is( $query_cgi, "query_cgi&op=%20operator%20&q=original_operand", + is( $query_cgi, "query_cgi&op=operator&q=original_operand", "\$query_cgi built correctly (no index passed)"); is( $query_desc, "query_desc operator index_plus original_operand", "\$query_desc build correctly (no index passed)"); @@ -164,7 +164,7 @@ subtest "_build_initial_query tests" => sub { C4::Search::_build_initial_query($params); is( $query, "query operator parsed_operand", "\$query built correctly (no index_plus passed)"); - is( $query_cgi, "query_cgi&op=%20operator%20&idx=index&q=original_operand", + is( $query_cgi, "query_cgi&op=operator&idx=index&q=original_operand", "\$query_cgi built correctly (no index_plus passed)"); is( $query_desc, "query_desc operator original_operand", "\$query_desc build correctly (no index_plus passed)"); diff --git a/t/Search/buildQuery.t b/t/Search/buildQuery.t index cab9d5aeef..f0163acb8e 100755 --- a/t/Search/buildQuery.t +++ b/t/Search/buildQuery.t @@ -274,7 +274,7 @@ subtest "kw:one and title:two ccode:REF weighted autotruncated" => sub { is($error,undef,"Error is correct"); is($query,'(rk=(kw,wrdl,rtrn=one )) and (rk=(title,wrdl,rtrn=two )) and ccode=REF','Query is correct with auto truncation, limits, and using indexes and operators'); is($simple_query,'one',"Simple query is correct?"); - is($query_cgi,'idx=kw&q=one&op=%20and%20&idx=title&q=two','Query cgi is correct'); + is($query_cgi,'idx=kw&q=one&op=and&idx=title&q=two','Query cgi is correct'); is($query_desc,'kw,wrdl: one and title,wrdl: two','Query desc is correct'); is($limit,'and ccode=REF',"Limit is correct"); is($limit_cgi,'&limit=ccode%3AREF',"Limit cgi is correct"); -- 2.39.5