SummerSchoolAcademy2022 / SS-BackEnd

1 stars 0 forks source link

UPDATE Category #16

Open FlorentinaCraciun opened 2 years ago

FlorentinaCraciun commented 2 years ago

Context: Please create the functionality that allows to "UPDATE" the Category

User Story: As a user, I want my application to be able to "UPDATE" the Category, so that I can change the information about a product

Acceptance Criteria:

Scenario 1- Update category - 200 OK

GIVEN a frontend app made a request to BE Platform AND a call is made to PATCH /categories/{categoryId} endpoint WHEN the category has all the mandatory fields THEN the platform will update the product raiting in the database

Scenario 2- Update category - 400 Bad Request

GIVEN a frontend app made a request to BE Platform AND a call is made to PATCH /categories/{categoryId} endpoint WHEN the category hasn't all the mandatory fields THEN the platform will return 400

Scenario 3- Update category - 404 Not Found

GIVEN a frontend app make a request to BE Platform AND a call is made to GET /categories/{categoryId} endpoint WHEN the category doesn't exist in the database THEN the platform will return 404 Not Found