Bug 17667: Add tests

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5f918d4118)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-12-18 18:10:07 +01:00 committed by Lucas Gass
parent 2d8a3ae0fb
commit 12cb3fe1f2
1 changed files with 6 additions and 1 deletions

View File

@ -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();