@@ -, +, @@ --- t/db_dependent/Acquisition.t | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) --- a/t/db_dependent/Acquisition.t +++ a/t/db_dependent/Acquisition.t @@ -8,7 +8,7 @@ use POSIX qw(strftime); use C4::Bookseller qw( GetBookSellerFromId ); -use Test::More tests => 77; +use Test::More tests => 79; BEGIN { use_ok('C4::Acquisition'); @@ -727,6 +727,21 @@ $search_orders = SearchOrders({ }); is( scalar (@$search_orders), 0, "SearchOrders with pending and ordered params gets only pending ordered orders (bug 11170)" ); +$search_orders = SearchOrders({ + ordernumber => $ordernumbers[4] +}); +is( scalar (@$search_orders), 1, "SearchOrders takes into account the ordernumber filter" ); + +$search_orders = SearchOrders({ + biblionumber => $biblionumber4 +}); +is( scalar (@$search_orders), 1, "SearchOrders takes into account the biblionumber filter" ); + +$search_orders = SearchOrders({ + biblionumber => $biblionumber4, + pending => 1 +}); +is( scalar (@$search_orders), 0, "SearchOrders takes into account the biblionumber and pending filters" ); # # Test GetBudgetByOrderNumber @@ -798,11 +813,6 @@ $search_orders = SearchOrders({ }); is( scalar (@$search_orders), 3, "SearchOrders with pending and ordered params gets only pending ordered orders. After closing the basket, orders are marked as 'ordered' (bug 11170)" ); -$search_orders = SearchOrders({ - ordernumber => $ordernumbers[4] -}); -is( scalar (@$search_orders), 1, "SearchOrders takes into account the ordernumber filter" ); - # # Test AddClaim # --