Task:
Test all endpoints (see README for list) with incomplete, out of order and invalid JSON request data.
Example:
/report
expects:
{
"beer_id": 123,
"establishment_id": 345,
"device_guid": "6b981317-1c2d-4219-ad79-7235013ad597"
}
Testing should include:
incomplete - do not send all parameters, test leaving out each parameter in turn, and in pairs (eg. leaving out beer and establishments)
out of order - put establishment_id before beer_id and beer_id after device_guid
invalid - put invalid data such as very long strings, strings for integers (so beer_id = "Ricky likes to brew beer")
Also test by sending the wrong headers (eg. instead of application/json send text/html)
see the README file for curl syntax for testing.
For each test case you complete, put it in the comments:
(a) the curl command you ran
(b) the result you received
(c) any output from the brew.js (if you ran it locally for test)