diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t index 5b1f09ea68..5302b47ae8 100755 --- a/t/db_dependent/HoldsQueue.t +++ b/t/db_dependent/HoldsQueue.t @@ -61,8 +61,7 @@ my $borrower_branchcode = $borrower->{branchcode}; my @branchcodes = ( $library1->{branchcode}, $library2->{branchcode}, $library3->{branchcode} ); my @other_branches = ( $library2->{branchcode}, $library3->{branchcode} ); my $least_cost_branch_code = pop @other_branches; -my $itemtype = Koha::ItemTypes->search({ notforloan => 0 })->next->itemtype; -$itemtype or BAIL_OUT("No adequate itemtype"); +my $itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; #Set up the stage # Sysprefs and cost matrix