Skip to content

Commit

Permalink
26117: "Current user does not have an active cart" even when he actua…
Browse files Browse the repository at this point in the history
…lly has one
  • Loading branch information
engcom-Charlie committed Mar 5, 2020
1 parent 5a9fcab commit afb752e
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(__('This 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 This 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 This 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 This cart isn't active.
*/
public function testGetInactiveCart()
{
Expand Down

0 comments on commit afb752e

Please sign in to comment.