From a77d0f3918d12b7e35abbca38d22ac526dec5334 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 31 Oct 2014 09:18:27 -0400 Subject: [PATCH 2/2] [PASSED QA] Bug 13113 [QA Followup] - Fix unit test Signed-off-by: Kyle M Hall --- t/db_dependent/Reserves.t | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index e5d3bb4..e969982 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -47,6 +47,9 @@ my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; +# Somewhat arbitrary field chosen for age restriction unit tests. Must be added to db before the framework is cached +$dbh->do("update marc_subfield_structure set kohafield='biblioitems.agerestriction' where tagfield='521' and tagsubfield='a'"); + # Setup Test------------------------ # Add branches if not existing @@ -481,7 +484,7 @@ C4::Context->set_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' ); #Set the ageRestriction for the Biblio my $record = GetMarcBiblio( $bibnum ); -my ( $ageres_tagid, $ageres_subfieldid ) = GetMarcFromKohaField( "biblioitems.agerestriction", '' ); +my ( $ageres_tagid, $ageres_subfieldid ) = GetMarcFromKohaField( "biblioitems.agerestriction" ); $record->append_fields( MARC::Field->new($ageres_tagid, '', '', $ageres_subfieldid => 'PEGI 16') ); C4::Biblio::ModBiblio( $record, $bibnum, '' ); -- 1.7.2.5