From d188a4995fe6b2d097ae696a90d4711459f140b9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 18 Dec 2019 18:10:07 +0100 Subject: [PATCH] Bug 17667: Add tests --- t/db_dependent/Acquisition/StandingOrders.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Acquisition/StandingOrders.t b/t/db_dependent/Acquisition/StandingOrders.t index 1fbe88fb01..d53d13d93d 100644 --- a/t/db_dependent/Acquisition/StandingOrders.t +++ b/t/db_dependent/Acquisition/StandingOrders.t @@ -2,7 +2,7 @@ use Modern::Perl; -use Test::More tests => 13; +use Test::More tests => 14; use C4::Context; use C4::Acquisition; use C4::Biblio; @@ -131,4 +131,9 @@ $search_orders = SearchOrders( { is( scalar @$search_orders, 1, 'only one pending order after receive' ); is( $search_orders->[0]->{ordernumber}, $ordernumber, 'original order is only pending order' ); +CancelReceipt($new_ordernumber); +$order = Koha::Acquisition::Orders->find( $ordernumber ); +is( $order->quantity, 1, 'CancelReceipt should not have increased the quantity if order is standing'); + + $schema->storage->txn_rollback(); -- 2.11.0