From aa220e672b575099a19d2e97768c4b3f035c518e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 27 Jun 2016 09:24:14 +0200 Subject: [PATCH] Bug 16671: [QA Follow-up] Add new itemtype and remove bailout No need to bail out, if we are using TestBuilder. Somehow, this test passes with me if we add a new record, and if we do not, it fails (using BK as the first itemtype with notforloan is 0). Looking further, we should imo remove the Koha::ItemTypes searches here and not depend on existing data. Just add some item types. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- t/db_dependent/HoldsQueue.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t index 5b1f09e..5302b47 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 -- 2.8.1