From 0e1bf697b8988931dd02e182c647e8a15d335476 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 7 Feb 2014 12:05:24 +0100 Subject: [PATCH] Bug 8918: Follow-up for use of AddBiblio in Reserves.t with UNIMARC Changed title and author field for UNIMARC. Signed-off-by: Marcel de Rooy Tested for MARC21, NORMARC and UNIMARC by adding temporary set_preference.. Signed-off-by: Kyle M Hall --- t/db_dependent/Reserves.t | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 1ea6f82..4b0058c 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -46,13 +46,19 @@ foreach my $addcat ('S', 'PT') { diag("\nCreating biblio instance for testing."); my $bib = MARC::Record->new(); my $title = 'Silence in the library'; -$bib->append_fields( - MARC::Field->new('100', ' ', ' ', a => 'Moffat, Steven'), - MARC::Field->new('245', ' ', ' ', a => $title), -); +if( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { + $bib->append_fields( + MARC::Field->new('600', '', '1', a => 'Moffat, Steven'), + MARC::Field->new('200', '', '', a => $title), + ); +} +else { + $bib->append_fields( + MARC::Field->new('100', '', '', a => 'Moffat, Steven'), + MARC::Field->new('245', '', '', a => $title), + ); +} my ($bibnum, $bibitemnum); -# If marcflavour is UNIMARC, AddBiblio fails and all following tests fail too. -C4::Context->set_preference('marcflavour', 'MARC21'); ($bibnum, $title, $bibitemnum) = AddBiblio($bib, ''); # Helper item for that biblio. -- 1.7.2.5