Skip to content

Commit d3c55bb

Browse files
authored
Merge pull request magento#4557 from magento-engcom/graphql-develop-prs
[Magento Community Engineering] Community Contributions - GraphQL
2 parents bd37cbf + 9021941 commit d3c55bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ public function testAddProductIfQuantityIsNotAvailable()
5050
* @magentoApiDataFixture Magento/Catalog/_files/products.php
5151
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
5252
* @magentoConfigFixture default_store cataloginventory/item_options/max_sale_qty 5
53-
* @expectedException \Exception
54-
* @expectedExceptionMessage The most you may purchase is 5.
5553
*/
5654
public function testAddMoreProductsThatAllowed()
5755
{
5856
$sku = 'custom-design-simple-product';
5957
$quantity = 7;
6058
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');
6159

60+
$this->expectExceptionMessageRegExp(
61+
'/The most you may purchase is 5|The requested qty exceeds the maximum qty allowed in shopping cart/'
62+
);
63+
6264
$query = $this->getQuery($maskedQuoteId, $sku, $quantity);
6365
$this->graphQlMutation($query);
6466
}

0 commit comments

Comments
 (0)