diff --git a/LoadExampleData.postman_collection.json b/LoadExampleData.postman_collection.json index 04e0a8b..7a5365b 100644 --- a/LoadExampleData.postman_collection.json +++ b/LoadExampleData.postman_collection.json @@ -7,6 +7,19 @@ "item": [ { "name": "Load first meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], @@ -33,6 +46,19 @@ }, { "name": "Load second meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], diff --git a/MealHomeWork.postman_collection.json b/MealHomeWork.postman_collection.json index c5ef697..5da9734 100644 --- a/MealHomeWork.postman_collection.json +++ b/MealHomeWork.postman_collection.json @@ -7,6 +7,19 @@ "item": [ { "name": "Load a meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(204);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], @@ -33,8 +46,21 @@ }, { "name": "Update a meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { - "method": "POST", + "method": "PUT", "header": [], "body": { "mode": "raw", @@ -60,6 +86,19 @@ }, { "name": "Get all meals", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [], @@ -77,6 +116,19 @@ }, { "name": "Get a specific meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [], @@ -95,6 +147,19 @@ }, { "name": "Delete a specific meal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "DELETE", "header": [],