From f8d73dbd49b34b29c947773421e48c82104c74ca 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 Signed-off-by: Kelly McElligott Signed-off-by: Katrin Fischer --- 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