NOTE: Update the tests you have written inline with the reviewed class-based views and make updates to this document
This test suite is responsible for testing user management-related APIs.
Description: This test case checks the user registration endpoint by sending a POST request to /api/login/
.
Expected Behavior:
- Response Status Code: 201 (Created)
- Response JSON contains a
user_id
andusername
.
Description: This test case checks the user login endpoint by sending a POST request to /api/login/
.
Expected Behavior:
- Response Status Code: 200 (OK)
- Response JSON contains a
token
.
Description: This test case checks the get user profile endpoint by sending a GET request to /api/users/profile
.
Expected Behavior:
- Response Status Code: 200 (OK)
- Response JSON contains a
user_id
.
Description: This test case checks the update user profile endpoint by sending a PUT request to /api/users/profile
.
Expected Behavior:
- Response Status Code: 200 (OK)
- Response JSON contains the updated email.
This test suite is responsible for testing event-related APIs.
Description: This test case checks the creation of an event by sending a POST request to the event creation endpoint - /api/event
.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks the retrieval of a list of events by sending a GET request to the event list endpoint - /api/event
.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks the retrieval of event details by sending a GET request to the event detail endpoint - ``.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks the update of event details by sending a PUT request to the event detail endpoint - ``.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks the deletion of an event by sending a DELETE request to the event detail endpoint - ``.
Expected Behavior:
- Response Status Code: 204 (No Content)
Description: This test case checks adding a comment to an event by sending a POST request to the comment creation endpoint.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks retrieving comments for an event by sending a GET request to the comment list endpoint.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks adding an image to a comment by sending a POST request to the image creation endpoint.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks retrieving images for a comment by sending a GET request to the image list endpoint.
Expected Behavior:
- Response Status Code: 200 (OK)
This test suite is responsible for testing comment-related APIs.
Description: This test case checks creating a new comment.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks listing comments.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks retrieving a specific comment.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks updating a comment.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks deleting a comment.
Expected Behavior:
- Response Status Code: 204 (No Content)
This test suite is responsible for testing group-related APIs.
Description: This test case checks creating a new group.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks listing groups.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks retrieving a specific group.
Expected Behavior:
- Response Status Code: 200 (OK)
Description: This test case checks updating a group.
Expected Behavior:
- Response Status Code: 200 (OK)
This test suite is responsible for testing like-related APIs.
Description: This test case checks creating a like for an event - /api/like
.
Expected Behavior:
- Response Status Code: 201 (Created)
Description: This test case checks creating a like by an unauthenticated user.
Expected Behavior:
- Response Status Code: 401 (Unauthorized)
- Response JSON contains a message indicating the need to be signed in.
Description: This test case checks creating a duplicate like.
Expected Behavior:
- Response Status Code: 400 (Bad Request)
- Response JSON contains a message indicating that double liking is not allowed.
Description: This test case checks deleting a like - /api/like/id
.
Expected Behavior:
- Response Status Code: 204 (No Content)
- The like is successfully deleted.
Description: This test case checks deleting a like by an unauthenticated user.
Expected Behavior:
- Response Status Code: 401 (Unauthorized)
- The like is not deleted.
Description: This test case checks deleting a non-existent like.
Expected Behavior:
- Response Status Code: 404 (Not Found)
- Response JSON contains a message indicating that the like does not exist.