[DELETE] An Activity #93
Labels
Status: Completed
Type: Feature
user story
A brief explanation of a functionality or an interaction with the system, from a user's perspective
Summary
As a
student
, I should be able to delete activities, so that I can remove old or inconsistent entries.Acceptance Criteria
GIVEN a
student
is deleting an activity in the appWHEN the app hits the
/activities/:id
endpoint with a valid DELETE request, containing the path parameter::id
, the unique id of the entity being removed.THEN the app should receive a status
200
AND in the response, the following information should be returned:
Sample Request/Sample Response
Resources
Dev Notes
{Some complementary notes if necessary}
Testing Notes
Scenario 1: DELETE request is successful (Owner):
/activities
endpoint using anadmin
account token and ensure a200
status code is returned.id
returned from the POST, make a DELETE request to/activities/:id
endpoint using astudent
account token witherp
==organizer_erp
and ensure a200
status code is returned./activities/:id
endpoint should return a status code404
.code
parameter should contain "NotFoundException".Scenario 2: DELETE request is successful (Admin):
/activities
endpoint using anadmin
account token and ensure a200
status code is returned.id
returned from the POST, make a DELETE request to/activities/:id
endpoint using anadmin
account token and ensure a200
status code is returned./activities/:id
endpoint should return a status code404
.code
parameter should contain "NotFoundException".Scenario 3: DELETE request is unsuccessful due to unknown activity_id
/activities/:id
endpoint containing a non-existentactivity_id
.404
status code is returned.code
parameter should contain "NotFoundException".Scenario 4: DELETE request is forbidden (Unowned Organizer ERP)
/activities/:id
endpoint for an activity withorganizer_erp
!= erp instudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: DELETE request is unauthorized
/activities/:id
endpoint without an authorization token401
unauthorized status code is returned.code
parameter should contain "TokenMissingException"The text was updated successfully, but these errors were encountered: