This pull request focuses on adding and improving tests for the editUser functionality in both integration and unit test files. The changes ensure that the editUser function is thoroughly tested for various scenarios, including successful edits, validation errors, and handling of duplicate emails.
Integration Tests:
Added a new describe block for editUser in tests/integration/controllers/userController.test.js with multiple test cases:
Successfully editing a user with the same email.
Successfully editing a user with a different email.
Handling cases where the email is already in use.
Handling validation errors for user attributes.
Unit Tests:
Added a new describe block for editUser in tests/unit/controllers/userController.test.js with multiple test cases:
Successfully editing a user with the same email.
Successfully editing a user with a different email.
This pull request focuses on adding and improving tests for the
editUser
functionality in both integration and unit test files. The changes ensure that theeditUser
function is thoroughly tested for various scenarios, including successful edits, validation errors, and handling of duplicate emails.Integration Tests:
describe
block foreditUser
intests/integration/controllers/userController.test.js
with multiple test cases:Unit Tests:
describe
block foreditUser
intests/unit/controllers/userController.test.js
with multiple test cases: