add postman tests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2022-02-13 22:58:05 +01:00
parent 47893ea636
commit db93e9578c
2 changed files with 92 additions and 1 deletions

View File

@ -7,6 +7,19 @@
"item": [ "item": [
{ {
"name": "Load first meal", "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": { "request": {
"method": "POST", "method": "POST",
"header": [], "header": [],
@ -33,6 +46,19 @@
}, },
{ {
"name": "Load second meal", "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": { "request": {
"method": "POST", "method": "POST",
"header": [], "header": [],

View File

@ -7,6 +7,19 @@
"item": [ "item": [
{ {
"name": "Load a meal", "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": { "request": {
"method": "POST", "method": "POST",
"header": [], "header": [],
@ -33,8 +46,21 @@
}, },
{ {
"name": "Update a meal", "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": { "request": {
"method": "POST", "method": "PUT",
"header": [], "header": [],
"body": { "body": {
"mode": "raw", "mode": "raw",
@ -60,6 +86,19 @@
}, },
{ {
"name": "Get all meals", "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": { "request": {
"method": "GET", "method": "GET",
"header": [], "header": [],
@ -77,6 +116,19 @@
}, },
{ {
"name": "Get a specific meal", "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": { "request": {
"method": "GET", "method": "GET",
"header": [], "header": [],
@ -95,6 +147,19 @@
}, },
{ {
"name": "Delete a specific meal", "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": { "request": {
"method": "DELETE", "method": "DELETE",
"header": [], "header": [],