[DELETE] A Subject #149
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 subjects, so that I can remove old or inconsistent entries.Acceptance Criteria
GIVEN an
admin
is deleting a subject in the appWHEN the app hits the
/subjects/:code
endpoint with a valid DELETE request, containing the path parameter::code
, 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:
/subjects
endpoint and ensure status code200
is returned./subjects/:code
endpoint and ensure status code200
is returned./subjects/:code
endpoint should return a status code404
.code
parameter should contain "NotFoundException".Scenario 2: DELETE request is unsuccessful due to unknown subject code
/subjects/:code
endpoint containing a non-existentsubject_code
.404
status code is returned.code
parameter should contain "NotFoundException".Scenario 3: DELETE request is forbidden
/subjects/:code
endpoint using astudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: DELETE request is unauthorized
/subjects/:code
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: