Bug 17574: Remove itemtype-related warnings from LocalHoldsPriority.t

To test:
- Run:
  $ prove t/db_dependent/Holds/LocalHoldsPriority.t
=> FAIL: Tests raise lots of warnings
- Apply the patch
- Run:
  $ prove t/db_dependent/Holds/LocalHoldsPriority.t
=> SUCCESS: Tests pass, and no warnings!
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Tomas Cohen Arazi 2016-11-07 15:31:53 -03:00 committed by Mason James
parent 0b307dc70c
commit 0f19991ac1
1 changed files with 19 additions and 14 deletions

View File

@ -26,26 +26,31 @@ $schema->storage->txn_begin;
my $builder = t::lib::TestBuilder->new;
my $library1 = $builder->build({
source => 'Branch',
});
my $library2 = $builder->build({
source => 'Branch',
});
my $library3 = $builder->build({
source => 'Branch',
});
my $library4 = $builder->build({
source => 'Branch',
});
my $library1 = $builder->build({ source => 'Branch', });
my $library2 = $builder->build({ source => 'Branch', });
my $library3 = $builder->build({ source => 'Branch', });
my $library4 = $builder->build({ source => 'Branch', });
my $itemtype = $builder->build(
{ source => 'Itemtype',
value => { notforloan => undef, rentalcharge => 0 }
}
)->{itemtype};
my $borrowers_count = 5;
# Create a helper biblio
my ( $bibnum, $title, $bibitemnum ) = create_helper_biblio();
# Create a helper item for the biblio.
my ( $item_bibnum, $item_bibitemnum, $itemnumber ) =
AddItem( { homebranch => $library4->{branchcode}, holdingbranch => $library3->{branchcode} }, $bibnum );
my ( $item_bibnum, $item_bibitemnum, $itemnumber ) = AddItem(
{ homebranch => $library4->{branchcode},
holdingbranch => $library3->{branchcode},
itype => $itemtype
},
$bibnum
);
my @branchcodes = ( $library1->{branchcode}, $library2->{branchcode}, $library3->{branchcode}, $library4->{branchcode}, $library3->{branchcode}, $library4->{branchcode} );