From 08ba576e4da34ed5b5742125f57c025794fdd383 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 25 Mar 2019 11:04:37 +0000 Subject: [PATCH] Bug 22565: Add test for ModReceiveOrder regression This test checks that order_internalnote is only updated for the given orderline in ModReceiveOrder. Signed-off-by: Martin Renvoize Signed-off-by: Josef Moravec --- t/db_dependent/Acquisition.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t index bbc136d5ce..3a07c8b3c8 100755 --- a/t/db_dependent/Acquisition.t +++ b/t/db_dependent/Acquisition.t @@ -415,8 +415,7 @@ $order2->{order_internalnote} = "my notes"; quantityreceived => 2, invoice => $invoice, } -) -; +); $order2 = GetOrder( $ordernumbers[1] ); is( $order2->{'quantityreceived'}, 0, 'Splitting up order did not receive any on original order' ); @@ -425,6 +424,12 @@ is( $order2->{'budget_id'}, $budgetid, 'Budget on original order is unchanged' ); is( $order2->{order_internalnote}, "my notes", 'ModReceiveOrder and GetOrder deal with internal notes' ); +my $order1 = GetOrder( $ordernumbers[0] ); +is( + $order1->{order_internalnote}, + "internal note", + "ModReceiveOrder only changes the supplied orders internal notes" +); $neworder = GetOrder($new_ordernumber); is( $neworder->{'quantity'}, 2, '2 items on new order' ); -- 2.11.0