Testing the Error Case for Create

Learn how to write an error case test for the create endpoint.

An error test for create

We can complete our coverage of this endpoint and controller action by testing a failure case. Inside the same describe block POST /users, and under our previous test, add this:

Get hands-on with 1200+ tech skills courses.