[PATCH] Accept A Student's Received Connection Request #116
Labels
Status: Completed
Type: Enhancement
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 connection requests, so that I can add the student to my friends list.Acceptance Criteria
GIVEN an
student
is accepting a friend request in the appWHEN the app hits the
/student-connections/:id
endpoint with a valid PATCH request, containing the path parameter:id
, the unique id of the entity being editedAND the following body parameters:
connection_status
=== 'friends'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)
/student-connections/:id
endpoint withreceiver_erp
== erp instudent
account token./student-connections/:id
endpoint should return a status code200
/student-connections/:id
endpoint to reverse the change and ensure status code200
is returned.Scenario 2: PATCH request is incorrect
/student-connections/: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
/student-connections/:id
endpoint withreceiver_erp
!= erp instudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 4: PATCH request is unauthorized
/student-connections/: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: