Skip to content

Commit

Permalink
lets ensure anyone can access the check email page
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Mar 31, 2021
1 parent 47e8033 commit b7ecf3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Resources/skeleton/resetPassword/twig_request.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

<button class="btn btn-primary">Send password reset email</button>
{{ form_end(requestForm) }}
{% endblock %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ public function testResetRequestRoute()
$client = static::createClient();
$client->request('GET', '/reset-password');

$this->assertSame(200, $client->getResponse()->getStatusCode());
self::assertSame(200, $client->getResponse()->getStatusCode());
}

public function testResetRequestRouteDeniesInvalidToken()
{
$client = static::createClient();
$client->request('GET', '/reset-password/reset/badToken1234');

$this->assertSame(302, $client->getResponse()->getStatusCode());
self::assertSame(302, $client->getResponse()->getStatusCode());
}

public function testCheckEmailRouteRedirectsToRequestRouteIfUserNotAllowedToCheckEmail()
public function testCheckEmailPageIsAlwaysAccessible()
{
$client = static::createClient();
$client->request('GET', '/reset-password/check-email');

$this->assertSame(302, $client->getResponse()->getStatusCode());
$this->assertResponseRedirects('/reset-password');
self::assertResponseIsSuccessful();
self::assertPageTitleSame('Password Reset Email Sent');
}
}

0 comments on commit b7ecf3e

Please sign in to comment.