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": [
{
"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": [],

View File

@ -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": [],