generated from RealDevSquad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Issue Description
The current integration test suite for the task update API (PATCH /v1/tasks/{taskId}) is not comprehensive. We need to add more test cases to cover various scenarios and ensure the endpoint is robust and reliable. This will help prevent regressions and bugs in the future.
Missing Test Cases
The following integration test cases are missing for the update task endpoint:
Payload Validation:
- Test with an empty payload (should return 400 Bad Request).
- Test with invalid values for
priority(e.g.,ULTRA_HIGH) andstatus(e.g.,ARCHIVED). - Test updating
dueAtwith a valid datetime string. - Test updating
dueAtwith an invalid datetime format. - Test sending fields that are not allowed to be updated (e.g.,
createdAt).
Partial Updates:
- Test updating only the
title. - Test updating only the
status. - Test updating only the
labels.
Authentication:
- Test making a request without authentication tokens (should return 401 Unauthorized).
Field Specific:
- Test updating the
assignee. - Test adding new labels to a task.
- Test removing labels from a task.
- Test replacing all labels of a task.
Acceptance Criteria
- All the missing test cases listed above are implemented in
todo/tests/integration/test_task_update_api.py. - The new tests should be well-structured and follow the existing patterns in the test suite.
- All tests, including the new ones, pass successfully.
Additional Information
This ticket was created based on the suggestion from @AnujChhikara to improve the test coverage for the task update functionality.
Metadata
Metadata
Assignees
Labels
No labels