From 731d78b18257472002b12a866fe2dd6f6421de9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Wit?= Date: Wed, 20 Mar 2024 11:14:20 +0100 Subject: [PATCH] Update tests to work with rawurlencode --- tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php | 2 +- tests/Integration/Services/ResetPasswordServiceTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php b/tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php index 33a5b3b..c1c0d31 100644 --- a/tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php +++ b/tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php @@ -47,7 +47,7 @@ public function it_sends_a_reset_password_notification(): void $url = call_user_func($notification::$createUrlCallback, $user, $notification->token); - return $url === "https://my-front-end.com/reset-password?email=john.doe@gmail.com&token={$notification->token}"; + return $url === "https://my-front-end.com/reset-password?email=john.doe%40gmail.com&token={$notification->token}"; }); } diff --git a/tests/Integration/Services/ResetPasswordServiceTest.php b/tests/Integration/Services/ResetPasswordServiceTest.php index e7b5df0..a9f48a0 100644 --- a/tests/Integration/Services/ResetPasswordServiceTest.php +++ b/tests/Integration/Services/ResetPasswordServiceTest.php @@ -42,7 +42,7 @@ public function it_transforms_a_reset_password_url(): void $url = $this->service->transformUrl($user, $token, 'https://mysite.com/reset-password/__EMAIL__/__TOKEN__'); - static::assertSame('https://mysite.com/reset-password/user@example.com/token123', $url); + static::assertSame('https://mysite.com/reset-password/user%40example.com/token123', $url); } #[\PHPUnit\Framework\Attributes\Test] @@ -61,7 +61,7 @@ public function it_sets_the_reset_password_url(): void $url = call_user_func(ResetPassword::$createUrlCallback, $user, $token); - static::assertSame('https://mysite.com/reset-password/user@example.com/token123', $url); + static::assertSame('https://mysite.com/reset-password/user%40example.com/token123', $url); } #[\PHPUnit\Framework\Attributes\Test]