@@ -, +, @@ --- t/db_dependent/HoldsQueue.t | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) --- a/t/db_dependent/HoldsQueue.t +++ a/t/db_dependent/HoldsQueue.t @@ -12,7 +12,7 @@ use C4::Context; use Data::Dumper; -use Test::More tests => 18; +use Test::More tests => 19; use C4::Branch; use C4::ItemType; @@ -148,6 +148,11 @@ ok( $queue_item && $queue_item->{holdingbranch} eq $least_cost_branch_code, "GetHoldsQueueItems" ) or diag( "Expected item for pick $borrower_branchcode, hold $least_cost_branch_code, got ".Dumper($queue_item) ); +ok( + C4::HoldsQueue::least_cost_branch( 'B', [ 'A', 'B', 'C' ] ) eq 'B', + 'C4::HoldsQueue::least_cost_branch returns the local branch if it is in the list of branches to pull from' +); + # XXX All this tests are for borrower branch pick-up. # Maybe needs expanding to homebranch or holdingbranch pick-up. --