Bugzilla – Attachment 126827 Details for
Bug 28847
Branch limits while searching should be expanded in query building and not in CGI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28847: Remove diag statements
Bug-28847-Remove-diag-statements.patch (text/plain), 4.55 KB, created by
Jonathan Druart
on 2021-10-25 13:03:13 UTC
(
hide
)
Description:
Bug 28847: Remove diag statements
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-25 13:03:13 UTC
Size:
4.55 KB
patch
obsolete
>From 272d5b9e3adc38a34e0dccdc4c201b431a8082f9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 25 Oct 2021 15:02:55 +0200 >Subject: [PATCH] Bug 28847: Remove diag statements > >--- > t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 3 --- > t/db_dependent/Koha/SearchEngine/Zebra/QueryBuilder.t | 3 --- > 2 files changed, 6 deletions(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index b322fb8d03a..2991ee39b67 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -723,7 +723,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > > my $query_builder = Koha::SearchEngine::Elasticsearch::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'both'); >- diag(" SearchLimitLibrary set to 'both'"); > my ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(homebranch: CPL OR holdingbranch: CPL)", "Branch limit expanded to home/holding branch"); >@@ -736,7 +735,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > is( $limit_cgi, "&limit=multibranchlimit%3A$groupid", "Multibranch limit cgi does not get expanded"); > > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'homebranch'); >- diag(" SearchLimitLibrary set to 'homebranch'"); > ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(homebranch: CPL)", "branch limit expanded to home branch"); >@@ -749,7 +747,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > is( $limit_cgi, "&limit=multibranchlimit%3A$groupid", "Limit cgi does not get expanded"); > > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'holdingbranch'); >- diag(" SearchLimitLibrary set to 'homebranch'"); > ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(holdingbranch: CPL)", "branch limit expanded to holding branch"); >diff --git a/t/db_dependent/Koha/SearchEngine/Zebra/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Zebra/QueryBuilder.t >index f26fc2e5164..02c129aa643 100755 >--- a/t/db_dependent/Koha/SearchEngine/Zebra/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Zebra/QueryBuilder.t >@@ -60,7 +60,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > > my $query_builder = Koha::SearchEngine::Zebra::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'both'); >- diag(" SearchLimitLibrary set to 'both'"); > my ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(homebranch= CPL or holdingbranch= CPL)", "Branch limit expanded to home/holding branch"); >@@ -73,7 +72,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > is( $limit_cgi, "&limit=multibranchlimit%3A$groupid", "Multibranch limit cgi does not get expanded"); > > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'homebranch'); >- diag(" SearchLimitLibrary set to 'homebranch'"); > ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(homebranch= CPL)", "branch limit expanded to home branch"); >@@ -86,7 +84,6 @@ subtest 'build_query_compat() SearchLimitLibrary tests' => sub { > is( $limit_cgi, "&limit=multibranchlimit%3A$groupid", "Limit cgi does not get expanded"); > > t::lib::Mocks::mock_preference('SearchLimitLibrary', 'holdingbranch'); >- diag(" SearchLimitLibrary set to 'homebranch'"); > ( undef, undef, undef, undef, undef, $limit, $limit_cgi, $limit_desc, undef ) = > $query_builder->build_query_compat( undef, undef, undef, [ "branch:CPL" ], undef, undef, undef, undef ); > is( $limit, "(holdingbranch= CPL)", "branch limit expanded to holding branch"); >-- >2.25.1
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 28847
:
123807
|
123808
|
123809
|
123830
|
123832
|
123833
|
123835
|
123836
|
123837
|
123841
|
124574
|
124575
|
124576
|
124577
|
124797
|
124831
|
125017
|
125018
|
125019
|
125020
|
125021
|
125022
| 126827