Skip to content

Commit

Permalink
ENGCOM-5518: GraphQl-795: WebAPI test failing with MSI for AddProduct…
Browse files Browse the repository at this point in the history
…ToCartTest::testAddMoreProductsThatAllowed magento#796

 - Merge Pull Request magento/graphql-ce#796 from magento/graphql-ce:graphql-795
 - Merged commits:
   1. 6e7df28
  • Loading branch information
magento-engcom-team committed Jul 30, 2019
2 parents 65cdb4c + 6e7df28 commit 951b817
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 951b817

Please sign in to comment.