Skip to content

Instantly share code, notes, and snippets.

@sylwit
Last active July 28, 2016 04:02
Show Gist options
  • Save sylwit/64c9567fade0b546a357ba0241cf294b to your computer and use it in GitHub Desktop.
Save sylwit/64c9567fade0b546a357ba0241cf294b to your computer and use it in GitHub Desktop.
Table for how testing your CRUD API
| Test | How | HTTP code expected | Assertions |
|------------------------------------------------|--------------------------------------|--------------------|------------------------|
| Should create a resource | Send full valid data | 201 | Check each property |
| Should fail returning all mandatory properties | Send a single non mandatory property | 400 | Count number of errors |
| Should fail if ... | Send data against business logic | 400 | |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment