Skip to content

Conversation

JaavierR
Copy link
Contributor

This PR adds feature tests that were previously untested in the starter kit. With these additions, a freshly generated application now reaches 100% test coverage out of the box. For example, if someone run pest with 100% coverage:

pest --parallel --coverage --exactly=100

will pass successfully on a clean install. This means developers start with full coverage by default, without having to write additional tests themselves.

Not everyone needs 100% coverage for their project, but having it baked into the starter kit provides a solid foundation to build from. Teams can then decide whether to maintain this level or adjust it to match their specific requirements.

Changes

The following authentication and verification scenarios are now covered by tests:

  • Users are rate limited after multiple failed login attempts.
  • An invalid user ID does not mark the email as verified.
  • Verified users visiting the email verification prompt are redirected to the dashboard.
  • Already verified users visiting the verification link are redirected without triggering the verification event again.
  • Password reset is rejected when using an invalid token.
  • A verification notification is sent to users who are not yet verified.
  • No verification notification is sent if the user's email is already verified.
  • The password update page is displayed correctly.

Notes

  • The starter kit uses PHPUnit as its base testing suite, so the new tests are written in PHPUnit and all pass successfully.
  • I'm not sure if the installer automatically translates these PHPUnit tests into Pest when Pest is selected during installation, or if they should be duplicated/updated in a Pest-specific location. I’d appreciate guidance on this point.

@joetannenbaum
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants