Fix failing scenario

This commit is contained in:
Jacob Tobiasz 2024-01-12 09:37:58 +01:00
parent 5c728d2d27
commit d691033530
No known key found for this signature in database
GPG key ID: 3F84290201B006E0
2 changed files with 6 additions and 7 deletions

View file

@ -15,7 +15,7 @@ Feature: Deleting the customer account
Then the user account should be deleted Then the user account should be deleted
But the customer with this email should still exist But the customer with this email should still exist
@ui @api @api @ui
Scenario: A customer with no user cannot be deleted Scenario: A customer with no user cannot be deleted
Given the account of "theodore@example.com" was deleted Given the account of "theodore@example.com" was deleted
Then I should not be able to delete it again Then I should not be able to delete it again

View file

@ -588,14 +588,13 @@ final class ManagingCustomersContext implements Context
*/ */
public function customerShouldStillExist(): void public function customerShouldStillExist(): void
{ {
$deletedUser = $this->sharedStorage->get('deleted_user'); /** @var CustomerInterface $customer */
$customer = $this->sharedStorage->get('customer');
$this->client->show(Resources::CUSTOMERS, (string) $deletedUser->getCustomer()->getId()); $this->client->show(Resources::CUSTOMERS, (string) $customer->getId());
Assert::same( Assert::same($this->client->getLastResponse()->getStatusCode(), 200);
$this->responseChecker->getValue($this->client->getLastResponse(), 'email'), Assert::same($this->responseChecker->getValue($this->client->getLastResponse(), 'email'), $customer->getEmail());
$deletedUser->getCustomer()->getEmail(),
);
} }
/** /**