[DELETE] A Campus Spot #86
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 campus spots, so that I can remove old or inconsistent entries.Acceptance Criteria
GIVEN an
admin
is deleting a campus spot in the appWHEN the app hits the
/campus-spots/: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:
/campus-spots
endpoint and ensure status code200
is returned.id
returned from the POST, make a DELETE request to/campus-spots/:id
endpoint and ensure status code200
is returned./campus-spots/:id
endpoint should return a status code404
.code
parameter should contain "NotFoundException".Scenario 2: DELETE request is unsuccessful
/activity-types/:id
endpoint containing a non-existentactivity_type_id
.404
status code is returned.code
parameter should contain "NotFoundException".Scenario 3: DELETE request is forbidden:
/campus-spots/:id
endpoint using astudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: DELETE request is unauthorized
/campus-spots/: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: