Skip to content

Fixed 404 error added PATCH/assign and implement validation - #56

Open
gujju7bhai wants to merge 1 commit into
rohit-ups:mainfrom
gujju7bhai:feature/fix-bugs-add-assignee
Open

Fixed 404 error added PATCH/assign and implement validation#56
gujju7bhai wants to merge 1 commit into
rohit-ups:mainfrom
gujju7bhai:feature/fix-bugs-add-assignee

Conversation

@gujju7bhai

Copy link
Copy Markdown

No description provided.

@gujju7bhai

Copy link
Copy Markdown
Author

Summary

  • Added comprehensive integration tests using Jest and Supertest, strictly covering success paths, validation failures, and 404 edge cases.

  • Fixed critical routing and logic bugs: resolved the PUT /tasks/:id 404 issue (params destructuring), corrected DELETE array index evaluation, and fixed substring status matching in getByStatus.

  • Implemented the PATCH /tasks/:id/assign endpoint, extracting validation logic into a dedicated utils/validators.js file for cleaner architecture.

  • Included detailed bug reports and submission notes addressing architectural observations (e.g., Jest open handles and app.listen separation).

Test plan

  • npm install && npm test (Executes the full Jest test suite to verify bug fixes and the new endpoint).

  • Review the bug report and submission notes for detailed breakdowns of the fixes and future architectural recommendations.

  • Manually verify PATCH /tasks/:id/assign via Postman: test a valid string, an empty string {"assignee": " "}, and a non-existent task ID.

  • Manually verify PUT /tasks/:id successfully updates an existing task instead of throwing a 404 Not Found error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant