Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Adding unit test user controllers #417

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

monkeycodez
Copy link

Test created for server/controllers/users/passwords.js
forgot password

Test create for server/controllers/users/profiles.js
Adds coverage for exceptions and if statement so admins cannot demote themselves

Created first test for forgot-password

On email not registered, success is returned, but nothing sent
On correct email provided, email is sent

Added test for forgot-password: token check

The reset token sent in email should match the token in the updated
user profile.

added admin cannot demote themselves test

update request cannot have blank first and last name

test:user trying to change email to an existing email

test: will not allow admin to update user if they do not have a name or if the email they are trying to update to is taken

Fixed admin cannot demote himself test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant