Closed Lepabryce closed 2 years ago
Hi Bryce,
Thank you for taking the time to contribute this feature to the website. As an additional request, it will be helpful if you could please create frontend and backend testcase for this feature.
Guidance for frontend testcases :
Selenium test case for the main password reset user stories: "As a user, I want to send a password reset email to my account."
Guidance for backend testcase:
A mocha/chai testcase to test that the token is saved inside the database table and that an email is successfully sent. (I am currently researching how to mock sessions and looking at how to perform "integration" tests. It is not convenient to unit test an entire route because it is composed of multiple individual units. In this case, an integration test may be a more accurate term to describe our motive: to ensure that when a user clicks on a pwd. rst. button, the database is populated with a rst. token)
Additionally, we were discussing about version controlling our database. If you have some time, could you please look at PR #87?
I am going to add some instructions there to explain how to create a migration for specific table in the database.
Thank you, Harsimrat
Added unit tests and integrated with DB migrations (PR #87)
Hi @harsimrat99, I implemented the env variables in the code and reduced the token to 64 characters in the latest commit. Let me know if there are any other issues.
Thanks, Bryce
Ensure to create the required password_reset table: