September 2018
Intermediate to advanced
764 pages
20h 6m
English
Since we added the validation steps, we now need to ensure that requests carrying valid user payloads will get added to the database, just like before. Therefore, at the end of spec/cucumber/features/users/create/main.feature, add the following scenario outline:
Scenario Outline: Valid Profile When the client creates a POST request to /users/ And attaches <payload> as the payload And sends the request Then our API should respond with a 201 HTTP status code And the payload of the response should be a string And the payload object should be added to the database, grouped under the "user" type And the newly-created user should be deleted Examples: | payload | | {"email":"e@ma.il","password":"password","profile":{}} ...Read now
Unlock full access