Bugzilla – Attachment 103698 Details for
Bug 25277
Z3950responder keyword search does not work with Elasticsearch 6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25277: Unit test
Bug-25277-Unit-test.patch (text/plain), 2.08 KB, created by
Nick Clemens (kidclamp)
on 2020-04-24 16:09:04 UTC
(
hide
)
Description:
Bug 25277: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-04-24 16:09:04 UTC
Size:
2.08 KB
patch
obsolete
>From a14b3f6804fe5a9f445a8f92f2bb57cb0fcfe258 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 24 Apr 2020 16:08:44 +0000 >Subject: [PATCH] Bug 25277: Unit test > >--- > t/db_dependent/Koha/Z3950Responder/GenericSession.t | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Z3950Responder/GenericSession.t b/t/db_dependent/Koha/Z3950Responder/GenericSession.t >index f888b02121..4b78e90f2c 100644 >--- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t >+++ b/t/db_dependent/Koha/Z3950Responder/GenericSession.t >@@ -23,7 +23,7 @@ our $child; > > subtest 'test_search' => sub { > >- plan tests => 19; >+ plan tests => 20; > > t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch'); > >@@ -75,7 +75,7 @@ subtest 'test_search' => sub { > $search->mock('simple_search_compat', sub { > my ( $self, $query ) = @_; > >- return ('unexpected query', undef, 0) unless $query eq '((author:(author)) AND ((title:(title\(s\))) OR (title:(speciäl))))'; >+ return ('unexpected query', undef, 0) unless $query eq '((author:(author)) AND ((title:(title\(s\))) OR (title:(speciäl))))' || $query eq "(simple search)"; > > my @records = ($marc_record_1, $marc_record_2); > return (undef, \@records, 2); >@@ -106,7 +106,7 @@ subtest 'test_search' => sub { > > my $rs = $Zconn->search_pqf('@and @attr 1=1 @attr 4=1 author @or @attr 1=4 title(s) @attr 1=4 speciäl'); > is($Zconn->errcode(), 0, 'Search is successful: ' . $Zconn->errmsg()); >- >+ > is($rs->size(), 2, 'Two results returned'); > > my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw(), 'UTF-8'); >@@ -117,6 +117,9 @@ subtest 'test_search' => sub { > ok($returned2, 'Record 2 returned as MARCXML'); > is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); > >+ $rs = $Zconn->search_pqf('"simple search"'); >+ is($Zconn->errcode(), 0, 'Search is successful: ' . $Zconn->errmsg()); >+ > # SRU protocol tests > my $base = 'http://localhost:42111'; > my $ns = 'http://www.loc.gov/zing/srw/'; >-- >2.11.0
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 25277
:
103690
|
103698
|
104293
|
104294
|
104942
|
104943