[DELETE] Cancel A Sent Hangout Request #128
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 cancel a hangout request, so that I can prevent a meetup.Acceptance Criteria
GIVEN a
student
is cancelling a hangout request in the appWHEN the app hits the
/hangout-requests/:id
endpoint with a valid DELETE request, containing the path parameters:id
, the unique id of the entity being removedTHEN the app should receive a status
200
AND in the response, the following information should be returned:
Sample Request/Sample Response
Resources
Dev Notes
None
Testing Notes
Scenario 1: DELETE request is successful (Sender cancels)
/hangout-requests
endpoint and ensure status code201
is returned.id
from the response to make a DELETE request to/hangout-requests/:id
endpoint using a token witherp
==sender_erp
.200
is returned./hangout-requests/:id
endpoint should return a status code404
.code
parameter should contain "NotFoundException".Scenario 2: DELETE request is unsuccessful due to unknown id
/hangout-requests/:id
endpoint containing a non-existenthangout_request_id
in path parameter.404
status code is returned.code
parameter should contain "NotFoundException"Scenario 3: DELETE request is forbidden due to unowned hangout request
/hangout-requests/:id
endpoint using astudent
account token with erp !==sender_erp
.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: DELETE request is unauthorized
/hangout-requests/: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: