Bugzilla – Attachment 59339 Details for
Bug 17909
Add unit tests for authority merge
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17909: [Follow-up] Quick fix for UNIMARC
Bug-17909-Follow-up-Quick-fix-for-UNIMARC.patch (text/plain), 3.13 KB, created by
Julian Maurice
on 2017-01-20 11:25:19 UTC
(
hide
)
Description:
Bug 17909: [Follow-up] Quick fix for UNIMARC
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-01-20 11:25:19 UTC
Size:
3.13 KB
patch
obsolete
>From 2c909f7d26ff9671b65620b3b089d615d847148b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 20 Jan 2017 11:29:30 +0100 >Subject: [PATCH] Bug 17909: [Follow-up] Quick fix for UNIMARC > >UNIMARC inserts field 100. This interferes the field count and order >in the test. >Note: This is a quick fix. Will polish it after bug 17913. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Authorities/Merge.t | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/t/db_dependent/Authorities/Merge.t b/t/db_dependent/Authorities/Merge.t >index 55470cc70e..17656b1f95 100755 >--- a/t/db_dependent/Authorities/Merge.t >+++ b/t/db_dependent/Authorities/Merge.t >@@ -66,12 +66,14 @@ subtest 'Test merge A1 to A2 (within same authtype)' => sub { > > # Check the results > my $newbiblio1 = GetMarcBiblio($biblionumber1); >+ $newbiblio1->delete_fields( $newbiblio1->field('100') ); # fix for UNIMARC > compare_field_count( $biblio1, $newbiblio1, 1 ); > compare_field_order( $biblio1, $newbiblio1, 1 ); > is( $newbiblio1->subfield('609', '9'), $authid1, 'Check biblio1 609$9' ); > is( $newbiblio1->subfield('609', 'a'), 'George Orwell', > 'Check biblio1 609$a' ); > my $newbiblio2 = GetMarcBiblio($biblionumber2); >+ $newbiblio2->delete_fields( $newbiblio2->field('100') ); # fix for UNIMARC > compare_field_count( $biblio2, $newbiblio2, 1 ); > compare_field_order( $biblio2, $newbiblio2, 1 ); > is( $newbiblio2->subfield('609', '9'), $authid1, 'Check biblio2 609$9' ); >@@ -108,10 +110,12 @@ subtest 'Test merge A1 to modified A1' => sub { > > #Check the results > my $biblio1 = GetMarcBiblio($biblionumber1); >+ $biblio1->delete_fields( $biblio1->field('100') ); # quick fix for UNIMARC > compare_field_count( $MARC1, $biblio1, 1 ); > compare_field_order( $MARC1, $biblio1, 1 ); > is( $auth1new->field(109)->subfield('a'), $biblio1->field(109)->subfield('a'), 'Record1 values updated correctly' ); > my $biblio2 = GetMarcBiblio( $biblionumber2 ); >+ $biblio2->delete_fields( $biblio2->field('100') ); # quick fix for UNIMARC > compare_field_count( $MARC2, $biblio2, 1 ); > compare_field_order( $MARC2, $biblio2, 1 ); > is( $auth1new->field(109)->subfield('a'), $biblio2->field(109)->subfield('a'), 'Record2 values updated correctly' ); >@@ -149,6 +153,7 @@ subtest 'Test merge A1 to B1 (changing authtype)' => sub { > ); > my ( $biblionumber ) = C4::Biblio::AddBiblio( $marc, '' ); > my $oldbiblio = C4::Biblio::GetMarcBiblio( $biblionumber ); >+ $oldbiblio->delete_fields( $oldbiblio->field('100') ); # fix for UNIMARC > > # Time to merge > @zebrarecords = ( $marc ); >@@ -158,6 +163,7 @@ subtest 'Test merge A1 to B1 (changing authtype)' => sub { > > # Get new marc record for compares > my $newbiblio = C4::Biblio::GetMarcBiblio( $biblionumber ); >+ $newbiblio->delete_fields( $newbiblio->field('100') ); # fix for UNIMARC > compare_field_count( $oldbiblio, $newbiblio, 1 ); > # TODO The following test will still fail; refined after 17913 > compare_field_order( $oldbiblio, $newbiblio, 0 ); >-- >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 17909
:
59005
|
59006
|
59007
|
59008
|
59011
|
59012
|
59013
|
59014
|
59015
|
59077
|
59088
|
59323
|
59324
|
59334
|
59335
|
59336
|
59337
|
59338
| 59339 |
59340