Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use email service in password recovery #171

Open
jamcunha opened this issue Jul 2, 2023 · 1 comment
Open

Use email service in password recovery #171

jamcunha opened this issue Jul 2, 2023 · 1 comment
Assignees
Milestone

Comments

@jamcunha
Copy link
Member

jamcunha commented Jul 2, 2023

As #82 wasn't ready yet, we did not use the email service in the password recovery method done in #113.

Regarding testing the password recovery request, we should:

  • Check that we do not send an email nor generate the token if the account does not exist.
  • Check that we generate and send the token if the account exists.

We can use mocks to confirm that functions are being called instead of sending actual emails.

Regarding testing the processing of the request part, additional tests should not be needed, but a refactor is necessary to receive the token for the test.

@BrunoRosendo BrunoRosendo added this to the Website MVP milestone Jul 3, 2023
@BrunoRosendo
Copy link
Member

You can check how it's being done in NIJobs as I believe it's pretty well implemented: https://github.com/NIAEFEUP/nijobs-be/blob/4ab4f74789c0568ecfa8a4f3c4c618ae13df5ad3/test/end-to-end/auth.js#L243

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

No branches or pull requests

3 participants