Closed francisli closed 6 months ago
Now that we have a test suite set up for the new user registration endpoint, we should test different error edge cases.
We should test leaving certain fields blank and ensure we get some validation errors returned, typically with a 422 unprocessible entity response.
This should also include entering an email that is already registered in the db.
We should probably enforce some password strength rules as well.
Here's some documentation on the subject from Prisma, showing usage of two different validation libraries:
https://www.prisma.io/docs/orm/prisma-client/queries/custom-validation
Now that we have a test suite set up for the new user registration endpoint, we should test different error edge cases.
We should test leaving certain fields blank and ensure we get some validation errors returned, typically with a 422 unprocessible entity response.
This should also include entering an email that is already registered in the db.
We should probably enforce some password strength rules as well.