Bugzilla – Attachment 186964 Details for
Bug 40883
Authorities display fails on unknown 7XX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40883: Add unit test
Bug-40883-Add-unit-test.patch (text/plain), 1.66 KB, created by
Fridolin Somers
on 2025-09-26 08:52:35 UTC
(
hide
)
Description:
Bug 40883: Add unit test
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2025-09-26 08:52:35 UTC
Size:
1.66 KB
patch
obsolete
>From c03bada3220cf5af53310f7d08f743b7e5bbcc40 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 26 Sep 2025 10:36:57 +0200 >Subject: [PATCH] Bug 40883: Add unit test > >--- > t/db_dependent/AuthoritiesMarc.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/AuthoritiesMarc.t b/t/db_dependent/AuthoritiesMarc.t >index e223ddba34..b9e5e6baaa 100755 >--- a/t/db_dependent/AuthoritiesMarc.t >+++ b/t/db_dependent/AuthoritiesMarc.t >@@ -6,7 +6,7 @@ > use Modern::Perl; > > use Test::NoWarnings; >-use Test::More tests => 14; >+use Test::More tests => 15; > use Test::MockModule; > use Test::Warn; > use MARC::Field; >@@ -74,6 +74,12 @@ $module->mock( > [ '001', '5' ], > [ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ] > ); >+ } elsif ( $authid eq '6' ) { >+ $record->add_fields( >+ [ '001', '6' ], >+ [ '199', ' ', ' ', a => 'Unkown heading' ], >+ [ '799', ' ', ' ', a => 'Unkown field', x => 'Unkown subdivision', 9 => '1' ] >+ ); > } else { > undef $record; > } >@@ -212,6 +218,10 @@ $marc21_subdiv->add_fields( [ '181', ' ', ' ', x => 'Political aspects' ] ); > warning_is { BuildSummary( $marc21_subdiv, 99999, 'GEN_SUBDIV' ) } [], > 'BuildSummary does not generate warning if main heading subfield not present'; > >+warning_is { >+ BuildSummary( C4::AuthoritiesMarc::GetAuthority(6), 6, 'CUSTOM_TYPE' ) } [], >+ 'BuildSummary does not generate warning if 7xx is unkown'; >+ > t::lib::Mocks::mock_preference( 'marcflavour', 'UNIMARC' ); > $dbh->do( > q{ >-- >2.43.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 40883
: 186964 |
186965