Given a client wants submit an order for a product
When the client sends a POST request to /orders
Then the API should create a new dictionary in the list of orders
And the API should respond with a JSON representation of the order and a status code header of 201
Here are the properties of an order
id
product_id
date_ordered
Given a client wants submit an order for a product
When the client sends a POST request to /orders
And any of the required properties are missing
Then the API should respond with an empty response body and a status code header of 400
Given a client wants submit an order for a product When the client sends a POST request to /orders Then the API should create a new dictionary in the list of orders And the API should respond with a JSON representation of the order and a status code header of 201
Here are the properties of an order
Given a client wants submit an order for a product When the client sends a POST request to /orders And any of the required properties are missing Then the API should respond with an empty response body and a status code header of 400