From 4f4eb9852387a016d8a04f9c5b37f7ffc711da2e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 31 Oct 2014 09:18:27 -0400 Subject: [PATCH] Bug 13113 [QA Followup] - Fix unit test Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Reserves.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index e5d3bb4aa2..e969982a4a 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, '' ); -- 2.39.5