-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
UserUpdate email already exists error fix #1385
UserUpdate email already exists error fix #1385
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersWhen your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@palisadoes added the test also in this PR, by mistake I closed the previous PR so had to open this one. |
Codecov Report
@@ Coverage Diff @@
## develop #1385 +/- ##
===========================================
+ Coverage 98.17% 98.24% +0.06%
===========================================
Files 184 184
Lines 10767 11295 +528
Branches 835 874 +39
===========================================
+ Hits 10571 11097 +526
- Misses 186 188 +2
Partials 10 10
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @palisadoes, please give feedback on it. |
What kind of change does this PR introduce?
Bugfix
Fixes #1382
Did you add tests for your changes?
Yes
Summary
Added a condition that will check if the user changed the email or not. If the email is changed then only it will check if the email already exists or not. Also changed "find" to "findOne" as we know only one user will have a email and it is faster. Unit test is also added.
Have you read the contributing guide?
Yes