it('deletes the first order using the delete action', () => {
provider
+
+ // Get Root Request
+ .uponReceiving("get root")
+ .withRequest({
+ path: "/",
+ })
+ .willRespondWith({
+ status: 200,
+ headers: {
+ 'Content-Type': 'application/vnd.siren+json'
+ },
+ body: {
+ class:[ "representation"],
+ links:[{"rel":["orders"], "href": url("http://localhost:9000", ["orders"]) }]
+ }
+ })
+
+ // Get Orders Request
.uponReceiving("get all orders")
.withRequest({
path: "/orders",
]
}
})
+
+ // Delete Order Request
.uponReceiving("delete order")
.withRequest({
method: "DELETE",