From 80f2d709c0b8ab2d705e849176303d6d4553e178 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 12 Nov 2014 20:39:05 -0300 Subject: [PATCH] Bug 13075: (followup) remove remaining warnings There's no point creating a MARC record with undef subfields for testing holds. This patch avoids that so no warnings are shown. To test: - Run $ prove t/db_dependent/Holds.t => FAIL: verify several warnings show - Apply the patch - Re-run => SUCCESS: no warnings showed. - Sign off :-D Regards --- t/db_dependent/Holds.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t index 3e2861c..4aee01b 100755 --- a/t/db_dependent/Holds.t +++ b/t/db_dependent/Holds.t @@ -33,10 +33,11 @@ $dbh->do('DELETE FROM itemtypes'); my $insert_sth = $dbh->prepare('INSERT INTO itemtypes (itemtype) VALUES (?)'); $insert_sth->execute('CAN'); $insert_sth->execute('CANNOT'); +$insert_sth->execute('DUMMY'); # Setup Test------------------------ # Create a biblio instance for testing -my ($bibnum, $title, $bibitemnum) = create_helper_biblio(); +my ($bibnum, $title, $bibitemnum) = create_helper_biblio('DUMMY'); # Create item instance for testing. my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum); @@ -186,7 +187,7 @@ ok( $reserve->{'priority'} eq '5', "Test AlterPriority(), move to bottom" ); # Note that canreservefromotherbranches has no effect if # IndependentBranches is OFF. -my ($foreign_bibnum, $foreign_title, $foreign_bibitemnum) = create_helper_biblio(); +my ($foreign_bibnum, $foreign_title, $foreign_bibitemnum) = create_helper_biblio('DUMMY'); my ($foreign_item_bibnum, $foreign_item_bibitemnum, $foreign_itemnumber) = AddItem({ homebranch => 'MPL', holdingbranch => 'MPL' } , $foreign_bibnum); $dbh->do('DELETE FROM issuingrules'); @@ -230,7 +231,7 @@ ok( ); # Regression test for bug 11336 -($bibnum, $title, $bibitemnum) = create_helper_biblio(); +($bibnum, $title, $bibitemnum) = create_helper_biblio('DUMMY'); ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum); AddReserve( $branch, -- 1.9.1