Bugzilla – Attachment 148337 Details for
Bug 33100
Authority linking doesn't work for bib headings ending in two or more punctuation characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33100: (QA follow-up) Trivial QA fixes
Bug-33100-QA-follow-up-Trivial-QA-fixes.patch (text/plain), 2.88 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-03-17 12:55:02 UTC
(
hide
)
Description:
Bug 33100: (QA follow-up) Trivial QA fixes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-03-17 12:55:02 UTC
Size:
2.88 KB
patch
obsolete
>From 19d1496c30bec9749aa400321a89d1bb4e4e7ded Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 17 Mar 2023 09:51:09 -0300 >Subject: [PATCH] Bug 33100: (QA follow-up) Trivial QA fixes > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Heading.t | 35 ++++++++++++++++++++--------------- > 1 file changed, 20 insertions(+), 15 deletions(-) > >diff --git a/t/db_dependent/Heading.t b/t/db_dependent/Heading.t >index 20f94ac3b3e..c839dea56e5 100755 >--- a/t/db_dependent/Heading.t >+++ b/t/db_dependent/Heading.t >@@ -69,24 +69,29 @@ subtest "_search tests" => sub { > t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch'); > my $search = Test::MockModule->new('Koha::SearchEngine::Elasticsearch::Search'); > >- $search->mock('search_auth_compat', sub { >- my $self = shift; >- my $search_query = shift; >- return $search_query; >- }); >- >- my $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,' ); >- my $heading = C4::Heading->new_from_field($field); >- my $search_query = $heading->_search( 'match-heading' ); >- my $terms = $search_query->{query}->{bool}->{must}; >+ $search->mock( >+ 'search_auth_compat', >+ sub { >+ my $self = shift; >+ my $search_query = shift; >+ return $search_query; >+ } >+ ); >+ >+ my ( $field, $heading, $search_query, $terms ); >+ >+ $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,' ); >+ $heading = C4::Heading->new_from_field($field); >+ $search_query = $heading->_search( 'match-heading' ); >+ $terms = $search_query->{query}->{bool}->{must}; > is_deeply( $terms->[0], { term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, "Search formed as expected for a non-subject field with single punctuation mark"); > > >- my $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,', e => '[author]' ); >- my $heading = C4::Heading->new_from_field($field); >- my $search_query = $heading->_search( 'match-heading' ); >- my $terms = $search_query->{query}->{bool}->{must}; >- is_deeply( $terms->[0], { term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, "Search formed as expected for a non-subject field with doulbe punctuation, hyphen+comma"); >+ $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,', e => '[author]' ); >+ $heading = C4::Heading->new_from_field($field); >+ $search_query = $heading->_search( 'match-heading' ); >+ $terms = $search_query->{query}->{bool}->{must}; >+ is_deeply( $terms->[0], { term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, "Search formed as expected for a non-subject field with double punctuation, hyphen+comma"); > > $field = MARC::Field->new( '100', ' ', '', a => 'Tolkien, J.R.R.,', e => '[author]' ); > $heading = C4::Heading->new_from_field($field); >-- >2.34.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 33100
:
147885
|
147886
|
148030
|
148031
|
148225
|
148226
| 148337