1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(tests): update postman collection

This commit is contained in:
Awilum
2021-09-23 10:28:37 +03:00
parent 54ae1e120f
commit 073fcc2e81

View File

@@ -1,7 +1,7 @@
{
"info": {
"_postman_id": "29d7e016-cea7-4386-84a2-4515e4958615",
"name": "Flextype",
"name": "Flextype API V0",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
@@ -14,20 +14,16 @@
{
"listen": "test",
"script": {
"id": "f2912507-a2ba-4b21-843e-8f0aef3cacd0",
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", () => {",
" pm.expect(pm.response.code).to.eql(200);",
"});"
],
"type": "text/javascript"
]
}
}
],
"_postman_id": "cc8dcc7c-c162-4106-a37a-756a573e1a0d",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "cc8dcc7c-c162-4106-a37a-756a573e1a0d",
"request": {
"method": "POST",
"header": [],
@@ -40,32 +36,30 @@
}
}
},
"url": "{{base_url}}/api/utils/cache/clear"
"url": "{{base_url}}/api/v0/utils/cache/clear"
},
"response": []
}
],
"_postman_id": "a33c6871-1019-4559-bd91-d922cf520ea1"
"id": "a33c6871-1019-4559-bd91-d922cf520ea1"
},
{
"name": "Entries",
"item": [
{
"name": "Fetch entry",
"_postman_id": "f2dd409b-c395-4610-8b50-493f6dab8571",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "f2dd409b-c395-4610-8b50-493f6dab8571",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/api/content?id={{entry_id}}&token={{token}}",
"raw": "{{base_url}}/api/v0/content?id={{entry_id}}&token={{token}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"v0",
"content"
],
"query": [
@@ -84,60 +78,51 @@
},
{
"name": "Create entry",
"_postman_id": "38392a86-0dee-4d75-80fd-31d7504ebdf5",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "38392a86-0dee-4d75-80fd-31d7504ebdf5",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"bar\",\n \"data\": {\n \"title\": \"Bar\"\n }\n}",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"{{entry_id}}\",\n \"data\": {\n \"title\": \"{{entry_title}}\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{base_url}}/api/entries"
"url": "{{base_url}}/api/v0/entries"
},
"response": []
},
{
"name": "Update entry",
"_postman_id": "9f045111-f130-406e-a369-c6ca002b0d26",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "9f045111-f130-406e-a369-c6ca002b0d26",
"request": {
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"bar\",\n \"data\": {\n \"title\": \"Bar\"\n }\n}",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"{{entry_id}}\",\n \"data\": {\n \"title\": \"{{entry_title}}\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{base_url}}/api/entries"
"url": "{{base_url}}/api/v0/entries"
},
"response": []
},
{
"name": "Move entry",
"_postman_id": "274afb61-dda3-4c06-b2f6-3e70d945520b",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "274afb61-dda3-4c06-b2f6-3e70d945520b",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"bar\",\n \"new_id\": \"zed\"\n}",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"{{entry_id}}\",\n \"new_id\": \"{{entry_new_id}}\"\n}",
"options": {
"raw": {
"language": "json"
@@ -150,16 +135,13 @@
},
{
"name": "Copy entry",
"_postman_id": "25d04444-9c92-4803-8565-c3c1e9778dfe",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "25d04444-9c92-4803-8565-c3c1e9778dfe",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"bar\",\n \"new_id\": \"zed\"\n}",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"{{entry_id}}\",\n \"new_id\": \"{{entry_new_id}}\"\n}",
"options": {
"raw": {
"language": "json"
@@ -172,16 +154,13 @@
},
{
"name": "Delete entry",
"_postman_id": "d38ae443-1d01-485d-b166-5ba694de497a",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "d38ae443-1d01-485d-b166-5ba694de497a",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"bar\"\n}",
"raw": "{\n \"token\": \"{{token}}\",\n \"access_token\": \"{{access_token}}\",\n \"id\": \"{{entry_id}}\"\n}",
"options": {
"raw": {
"language": "json"
@@ -193,7 +172,7 @@
"response": []
}
],
"_postman_id": "c9d106e8-8f90-4f61-af3f-9033043d73fb"
"id": "c9d106e8-8f90-4f61-af3f-9033043d73fb"
},
{
"name": "Registry",
@@ -204,24 +183,16 @@
{
"listen": "test",
"script": {
"id": "c672063d-49de-49e2-a731-51bbe571eb56",
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Status code is 404\", function () {",
" pm.response.to.have.status(404);",
"});"
],
"type": "text/javascript"
]
}
}
],
"_postman_id": "85a9bbea-c89e-46da-a574-3f0ec29a15b8",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"id": "85a9bbea-c89e-46da-a574-3f0ec29a15b8",
"request": {
"method": "GET",
"header": [],
@@ -249,7 +220,7 @@
"response": []
}
],
"_postman_id": "07206fde-26e3-47d6-958f-cbbffd5b2eb9"
"id": "07206fde-26e3-47d6-958f-cbbffd5b2eb9"
}
]
}
}