Skip to content

Commit

Permalink
Update tests to work with rawurlencode
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit committed Mar 20, 2024
1 parent f111470 commit 898d56d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/Integration/GraphQL/Mutations/ForgotPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
});
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Services/ResetPasswordServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down

0 comments on commit 898d56d

Please sign in to comment.