Skip to content

Commit 38e0bc3

Browse files
committed
AC-1479: Incorrect qty to ship after few creditmemos
Fix unit and integration test
1 parent c545683 commit 38e0bc3

File tree

2 files changed

+2
-4
lines changed
  • app/code/Magento/Sales/Test/Unit/Model/Order
  • dev/tests/integration/testsuite/Magento/Sales/Model/Order

2 files changed

+2
-4
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ public function testGetOrder()
105105
->willReturnSelf();
106106

107107
// Create a mock factory for this specific test
108-
$mockFactory = $this->getMockBuilder(OrderFactoryStub::class)
109-
->onlyMethods(['create'])
110-
->getMock();
108+
$mockFactory = $this->createPartialMock(SalesOrderFactory::class, ['create']);
111109
$mockFactory->expects($this->once())
112110
->method('create')
113111
->willReturn($order);

dev/tests/integration/testsuite/Magento/Sales/Model/Order/ItemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ public function testGetSimpleQtyToShip()
124124

125125
// Assert getSimpleQtyToShip value
126126
// Qty to ship = Qty ordered (10) - Qty shipped (2) - Qty refunded (4) = 4
127-
$this->assertEquals(4, $orderItem->getSimpleQtyToShip(), 'Simple qty to ship should be 3');
127+
$this->assertEquals(4, $orderItem->getSimpleQtyToShip(), 'Simple qty to ship should be 4');
128128
}
129129
}

0 commit comments

Comments
 (0)