You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces a new test suite, `PromoCommentsTestCase`, to provide robust test coverage for the promo comments API endpoints.
Key functionality covered:
- **CRUD Operations**: Full lifecycle testing for creating (POST), retrieving (GET list/detail), updating (PUT), and deleting (DELETE) comments.
- **Permissions**: Verifies that users can only modify or delete their own comments (403 Forbidden).
- **Error Handling**: Validates correct 404 Not Found responses for invalid requests, such as mismatched promo and comment IDs.
- **Data Integrity**: Ensures the `comment_count` on the parent Promo object is correctly updated after comments are created or deleted.
- **Listing & Pagination**: Confirms that comments are listed in reverse chronological order and that pagination headers (`X-Total-Count`) are accurate.
0 commit comments