As a admin, I should be able to update the details of an interest, so that I can fix old or inconsistent entries #40
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 update the details of an interest, so that I can fix old or inconsistent entries.Acceptance Criteria
GIVEN an
admin
is editing an interest in the appWHEN the app hits the
interests/:id
endpoint with a valid PATCH request, containing:-The path parameter:
:id
, the unique id of the entity of which the details are edited.And any of the following body parameters:
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: PATCH request is successful
/interests/:id
endpoint/interests/:id
endpoint should return a status code200
interests/:id
endpoint to reverse the change and ensure status code200
is returned.Scenario 2: PATCH request is unsuccessful
/interests/:id
endpoint containing a non-existentinterest_id
.404
status code is returned.code
parameter should contain "NotFoundException".Scenario 3: PATCH request is incorrect
/interests/: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 parameter.Scenario 4: PATCH request is forbidden
/interests/:id
endpoint using astudent
account token.403
forbidden status code.code
parameter should contain "ForbiddenException"Scenario 5: PATCH request is unauthorized
/interests
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: