[DELETE] A Classroom #162
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 an
admin
, I should be able to delete classrooms, so that I can remove old or inconsistent entries.Acceptance Criteria
GIVEN an
admin
is deleting a classroom in the appWHEN the app hits the
/classrooms/: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:
/classrooms
endpoint and ensure status id200
is returned./classrooms/:id
endpoint and ensure status id200
is returned./classrooms/:id
endpoint should return a status id404
.id
parameter should contain "NotFoundException".Scenario 2: DELETE request is unsuccessful due to unknown classroom id
/classrooms/:id
endpoint containing a non-existentclassroom_id
.404
status id is returned.id
parameter should contain "NotFoundException".Scenario 3: DELETE request is forbidden
/classrooms/:id
endpoint using astudent
account token.403
forbidden status id.id
parameter should contain "ForbiddenException"Scenario 4: DELETE request is unauthorized
/classrooms/:id
endpoint without an authorization token401
unauthorized status id is returned.id
parameter should contain "TokenMissingException"The text was updated successfully, but these errors were encountered: