Skip to content

Commit 48070b2

Browse files
author
Viktor Tymchynskyi
committed
MAGETWO-24173: "Void" button available after "Deny Payment" operation (add test)
1 parent d3b0e89 commit 48070b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/Sales/Test/Unit/Model/OrderTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ public function testCanVoidPayment($actionFlags, $orderState)
348348
$order->setData('state', $orderState);
349349
$payment = $this->_prepareOrderPayment($order);
350350
$canVoidOrder = true;
351+
352+
if ($orderState == \Magento\Sales\Model\Order::STATE_CANCELED) {
353+
$canVoidOrder = false;
354+
}
355+
351356
if ($orderState == \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW) {
352357
$canVoidOrder = false;
353358
}

0 commit comments

Comments
 (0)