Skip to content

Commit

Permalink
ENGCOM-7074: 26117: 'Current user does not have an active cart' even …
Browse files Browse the repository at this point in the history
…when he actually has one #27187

 - Merge Pull Request #27187 from engcom-Charlie/magento2:26117
 - Merged commits:
   1. afb752e
   2. 1f87785
   3. a8450f4
  • Loading branch information
magento-engcom-team committed Mar 10, 2020
2 parents cac512f + a8450f4 commit f0e39e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ public function execute(string $cartHash, ?int $customerId, int $storeId): Quote
}

if (false === (bool)$cart->getIsActive()) {
throw new GraphQlNoSuchEntityException(
__('Current user does not have an active cart.')
);
throw new GraphQlNoSuchEntityException(__('The cart isn\'t active.'));
}

if ((int)$cart->getStoreId() !== $storeId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testGetNonExistentCart()
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
*
* @expectedException Exception
* @expectedExceptionMessage Current user does not have an active cart.
* @expectedExceptionMessage The cart isn't active.
*/
public function testGetInactiveCart()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function testMergeGuestWithCustomerCart()
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
* @expectedException \Exception
* @expectedExceptionMessage Current user does not have an active cart.
* @expectedExceptionMessage The cart isn't active.
*/
public function testGuestCartExpiryAfterMerge()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function testGetNonExistentCart()
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
*
* @expectedException Exception
* @expectedExceptionMessage Current user does not have an active cart.
* @expectedExceptionMessage The cart isn't active.
*/
public function testGetInactiveCart()
{
Expand Down

0 comments on commit f0e39e3

Please sign in to comment.