Skip to content

Commit

Permalink
Merge pull request magento#4557 from magento-engcom/graphql-develop-prs
Browse files Browse the repository at this point in the history
[Magento Community Engineering] Community Contributions - GraphQL
  • Loading branch information
naydav authored Jul 31, 2019
2 parents bd37cbf + 9021941 commit d3c55bb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ public function testAddProductIfQuantityIsNotAvailable()
* @magentoApiDataFixture Magento/Catalog/_files/products.php
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
* @magentoConfigFixture default_store cataloginventory/item_options/max_sale_qty 5
* @expectedException \Exception
* @expectedExceptionMessage The most you may purchase is 5.
*/
public function testAddMoreProductsThatAllowed()
{
$sku = 'custom-design-simple-product';
$quantity = 7;
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$this->expectExceptionMessageRegExp(
'/The most you may purchase is 5|The requested qty exceeds the maximum qty allowed in shopping cart/'
);

$query = $this->getQuery($maskedQuoteId, $sku, $quantity);
$this->graphQlMutation($query);
}
Expand Down

0 comments on commit d3c55bb

Please sign in to comment.