[PATCH] Accept/Reject A Received Hangout Request #127
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 accept/reject hangout requests, so that I can meet/avoid new students.Acceptance Criteria
GIVEN an
student
is accepting/rejecting a hangout request in the appWHEN the app hits the
/hangout-requests/:id
endpoint with a valid PATCH request, containing the path parameter:id
, the unique id of the entity being editedAND the following body parameters:
request_status
, can be either 'accepted'/'rejected'accepted_at
datetimeTHEN 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: PATCH request is successful (Receiver)
/hangout-requests/:id
endpoint withreceiver_erp
== erp instudent
account token./hangout-requests/:id
endpoint should return a status code200
/hangout-requests/:id
endpoint to reverse the change and ensure status code200
is returned.Scenario 2: PATCH request is incorrect
/hangout-requests/:id
endpoint with an incorrect key name in the body422
status code is returnedcode
parameter should contain "InvalidPropertiesException"data
parameter should contain the name of the invalid parameterScenario 3: PATCH request is forbidden
/hangout-requests/:id
endpoint withreceiver_erp
!= erp instudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: PATCH 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: