File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,24 @@ public function testUpdateCartItemDecimalQuantity()
5454 $ this ->graphQlMutation ($ query );
5555 }
5656
57+ /**
58+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
59+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
60+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
61+ */
62+ public function testUpdateCartItemSetUnavailableQuantity ()
63+ {
64+ $ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ('test_quote ' );
65+ $ itemId = $ this ->getQuoteItemIdByReservedQuoteIdAndSku ->execute ('test_quote ' , 'simple_product ' );
66+
67+ $ quantity = 100 ;
68+ $ this ->expectExceptionMessage (
69+ "Could not update the product with SKU simple_product: The requested qty is not available "
70+ );
71+ $ query = $ this ->getQuery ($ maskedQuoteId , $ itemId , $ quantity );
72+ $ this ->graphQlMutation ($ query );
73+ }
74+
5775 /**
5876 * @param string $maskedQuoteId
5977 * @param int $itemId
You can’t perform that action at this time.
0 commit comments