As a contractor, I should be able to update the details of a laborer, so that I can remove old or inconsistent laborer records.
Acceptance Criteria
GIVEN a contractor is editing a laborer in the desktop app
WHEN the app hits the laborers/:id endpoint with a valid PATCH request, containing:-
The path parameter:
:id, the unique id of the laborer whose details are edited.
And any of the following body parameters:
first_name
last_name
hired_date
contact
THEN the app should receive a status 200AND in the response, the following information should be returned:
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
Resources
Development URL: {Here goes a URL to the feature on development API}
Production URL: {Here goes a URL to the feature on production API}
Dev Notes
{Some complementary notes if necessary}
Testing Notes
Scenario: PATCH request is successful
Update a laborer with a PATCH request to /laborers/:id endpoint
A subsequent GET request to /laborers/:id endpoint should return the laborer profile with the updated information i.e. matching the initially sent body.
Summary
As a
contractor
, I should be able to update the details of a laborer, so that I can remove old or inconsistent laborer records.Acceptance Criteria
GIVEN a
contractor
is editing a laborer in the desktop app WHEN the app hits thelaborers/:id
endpoint with a valid PATCH request, containing:- The path parameter::id
, the unique id of the laborer whose 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: PATCH request is successful
/laborers/:id
endpoint/laborers/:id
endpoint should return the laborer profile with the updated information i.e. matching the initially sent body.