anitab-org / mentorship-backend

Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the backend of this system.
https://mentorship-backend-temp.herokuapp.com/
GNU General Public License v3.0
196 stars 449 forks source link

Solved Issue #596 of updating user with current username #1159

Open hirshrm opened 1 year ago

hirshrm commented 1 year ago

Description

Fixed Issue #596 such that when a user attempts to update their username with their current username (ex. user "123" tries to update the username to "123"), they receive an HTTP OK response and not an error. No fields will be updated and the message attached to the OK response reports that accordingly.

A test has been added to the test file to cover this edge case.

Fixes #596

Type of Change:

How Has This Been Tested?

New test method that creates a user and tries to update the username to the existing username. It asserts that the response code and message are as expected. The test passed on local device.

Checklist:

Code/Quality Assurance Only

welcome[bot] commented 1 year ago

Hello there!👋 Welcome to the project!💖 Thank you and congrats 🎉 for opening your first PR on this project.✨ Please ensure your Pull Request meets the Commit Message Style Guide. We will review it soon! Until then you can check out the README.md for more details on it.

AnitaB.org Open Source is an inclusive community, committed to creating a safe and positive environment 🌸 Please follow our Code Of Conduct.

Feel free to join our community at AnitaB.org Open Source Zulip Community to be kept up to date with our projects discussions and community activities. Hope you have a great time here :)