Bug 13075: (followup) remove remaining warnings
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 12 Nov 2014 23:39:05 +0000 (20:39 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 14 Nov 2014 12:35:50 +0000 (09:35 -0300)
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

NOTE: Not noticable under Ubuntu 12.04 LTS, but verifiable under
      Debian Wheezy.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/db_dependent/Holds.t

index 3e2861c..4aee01b 100755 (executable)
@@ -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,