Simulate several status code responses for your API tests
Healthcheck
/_ah/health
$ curl -i http://localhost:4000/_ah/health
HTTP/1.1 200 OK
Health :)
Statuses
/api/status/:status
$ curl -i http://localhost:4000/api/status/201
HTTP/1.1 201 Created
{"status":201}
Clone this repository anywhere
git clone git@github.com:wesleimp/fake-status-api.git
Install and compile dependencies
mix do deps.get, deps.compile
A good way of making sure everything is all right is running the test suite:
MIX_ENV=test mix test
Running the API locally
mix run --no-halt