Bugzilla – Attachment 137831 Details for
Bug 31106
Error searching for analytics in detail view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31106: Unit tests
Bug-31106-Unit-tests.patch (text/plain), 1.46 KB, created by
Martin Renvoize (ashimema)
on 2022-07-18 16:55:44 UTC
(
hide
)
Description:
Bug 31106: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-18 16:55:44 UTC
Size:
1.46 KB
patch
obsolete
>From d60a535f38075944551f9f037f400e03e761e7b3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 Jul 2022 15:18:44 -0300 >Subject: [PATCH] Bug 31106: Unit tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/Koha/SearchEngine/Zebra/QueryBuilder.t | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/t/Koha/SearchEngine/Zebra/QueryBuilder.t b/t/Koha/SearchEngine/Zebra/QueryBuilder.t >index 809eb3a524..6dca03263d 100755 >--- a/t/Koha/SearchEngine/Zebra/QueryBuilder.t >+++ b/t/Koha/SearchEngine/Zebra/QueryBuilder.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 3; >+use Test::More tests => 4; > use Test::MockModule; > > use_ok('Koha::SearchEngine::Zebra::QueryBuilder'); >@@ -76,3 +76,17 @@ subtest 'build_query_compat() tests' => sub { > ( undef, $query ) = $qb->build_query_compat( undef, undef, undef, undef, undef, undef, undef, { suppress => 0 } ); > is( $query, 'query', 'Suppress part of the query not added (PQF)'); > }; >+ >+subtest 'clean_search_term() tests' => sub { >+ >+ plan tests => 2; >+ >+ my $qb; >+ ok( >+ $qb = Koha::SearchEngine::Zebra::QueryBuilder->new(), >+ 'Creating a new QueryBuilder object' >+ ); >+ >+ my $res = $qb->clean_search_term('test "query":'); >+ is($res, 'test \"query\":', 'Double-quotes are escaped'); >+}; >-- >2.20.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 31106
:
137183
|
137184
|
137185
|
137237
|
137238
|
137239
|
137246
|
137247
|
137248
| 137831 |
137832
|
137833