Bugzilla – Attachment 167267 Details for
Bug 35989
Searching Geographic authorities generates error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35989: (QA follow-up): Fix QA tests
Bug-35989-QA-follow-up-Fix-QA-tests.patch (text/plain), 4.36 KB, created by
Matt Blenkinsop
on 2024-05-30 08:24:36 UTC
(
hide
)
Description:
Bug 35989: (QA follow-up): Fix QA tests
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-05-30 08:24:36 UTC
Size:
4.36 KB
patch
obsolete
>From f633022c9bddf170526a8481c8272c00832ca9ad Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 30 May 2024 08:22:08 +0000 >Subject: [PATCH] Bug 35989: (QA follow-up): Fix QA tests > >Some file tidying to pass the QA tests >--- > C4/AuthoritiesMarc.pm | 6 +-- > t/db_dependent/AuthoritiesMarc.t | 70 +++++++++++++++++--------------- > 2 files changed, 40 insertions(+), 36 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 4c61f8bedb..1656a2ba9b 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1009,9 +1009,9 @@ sub BuildSummary { > } } $record->field('7..'); > > } else { >-# construct MARC21 summary >-# FIXME - looping over 1XX is questionable >-# since MARC21 authority should have only one 1XX >+ # construct MARC21 summary >+ # FIXME - looping over 1XX is questionable >+ # since MARC21 authority should have only one 1XX > use C4::Heading::MARC21; > my $handler = C4::Heading::MARC21->new(); > my $subfields_to_report; >diff --git a/t/db_dependent/AuthoritiesMarc.t b/t/db_dependent/AuthoritiesMarc.t >index e1b117fbc6..55435d281b 100755 >--- a/t/db_dependent/AuthoritiesMarc.t >+++ b/t/db_dependent/AuthoritiesMarc.t >@@ -29,44 +29,48 @@ $module->mock('GetHeaderAuthority', sub { > $module->mock('AddAuthorityTrees', sub { > return; > }); >-$module->mock('GetAuthority', sub { >- my ($authid) = @_; >- my $record = MARC::Record->new(); >- if ($authid eq '1') { >- $record->add_fields( >- [ '001', '1' ], >- [ '151', ' ', ' ', a => 'United States' ] >+$module->mock( >+ 'GetAuthority', >+ sub { >+ my ($authid) = @_; >+ my $record = MARC::Record->new(); >+ if ( $authid eq '1' ) { >+ $record->add_fields( >+ [ '001', '1' ], >+ [ '151', ' ', ' ', a => 'United States' ] >+ ); >+ } elsif ( $authid eq '2' ) { >+ $record->add_fields( >+ [ '001', '2' ], >+ [ '151', ' ', ' ', a => 'New York (State)' ], >+ [ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], >+ [ '751', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], >+ [ '781', ' ', ' ', a => 'New York', x => 'General subdivision', 9 => '1' ] > ); >- } elsif ($authid eq '2') { >- $record->add_fields( >- [ '001', '2' ], >- [ '151', ' ', ' ', a => 'New York (State)' ], >- [ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], >- [ '751', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], >- [ '781', ' ', ' ', a => 'New York', x => 'General subdivision', 9 => '1' ] >- ); >- } elsif ($authid eq '3') { >- $record->add_fields( >- [ '001', '3' ], >- [ '151', ' ', ' ', a => 'New York (City)' ], >- [ '551', ' ', ' ', a => 'New York (State)', w => 'g', 9 => '2' ] >+ } elsif ( $authid eq '3' ) { >+ $record->add_fields( >+ [ '001', '3' ], >+ [ '151', ' ', ' ', a => 'New York (City)' ], >+ [ '551', ' ', ' ', a => 'New York (State)', w => 'g', 9 => '2' ] > ); >- } elsif ($authid eq '4') { >- $record->add_fields( >- [ '001', '4' ], >- [ '151', ' ', ' ', a => 'New York (City)' ], >- [ '551', ' ', ' ', a => 'New York (State)', w => 'g' ] >+ } elsif ( $authid eq '4' ) { >+ $record->add_fields( >+ [ '001', '4' ], >+ [ '151', ' ', ' ', a => 'New York (City)' ], >+ [ '551', ' ', ' ', a => 'New York (State)', w => 'g' ] > ); >- } elsif ($authid eq '5') { >- $record->add_fields( >- [ '001', '5' ], >- [ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ] >+ } elsif ( $authid eq '5' ) { >+ $record->add_fields( >+ [ '001', '5' ], >+ [ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ] > ); >- } else { >- undef $record; >+ } else { >+ undef $record; >+ } >+ return $record; > } >- return $record; >-}); >+); >+ > > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >-- >2.37.1 (Apple Git-137.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 35989
:
166811
|
166821
|
167244
|
167245
|
167267
|
167422
|
167423
|
167424