Skip to content

Commit e55a9e3

Browse files
MC-39104: 2 error messages in Cart when product is out of stock
1 parent 468383e commit e55a9e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,11 @@ public function testValidateOutStockWithAlreadyErrorInQuoteItem(): void
490490
$this->stockStatusMock->expects($this->atLeastOnce())
491491
->method('getStockStatus')
492492
->willReturn(1);
493-
$this->quoteItemMock->expects($this->never())
493+
$this->quoteItemMock->expects($this->once())
494494
->method('addErrorInfo')
495495
->with(
496-
'cataloginventory',
496+
null,
497497
Data::ERROR_QTY,
498-
__('This product is out of stock.')
499498
);
500499
$this->quoteMock->expects($this->once())
501500
->method('addErrorInfo')

0 commit comments

Comments
 (0)