-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-test.postman_collection.json
56 lines (56 loc) · 1.37 KB
/
api-test.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
"info": {
"_postman_id": "f4361bd9-c227-471c-814d-5649bb884f0d",
"name": "api-test",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get /customers",
"event": [
{
"listen": "test",
"script": {
"id": "5809b3ea-5bb1-4af4-9be1-8cac2e9c6a90",
"exec": [
"pm.test(\"Status test\", function () {",
" pm.response.to.have.status(200);",
"});",
"pm.test(\"2 rows returned\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.length).to.eql(2);",
"});",
"pm.test(\"First customer is called Mike\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData[0].firstname).to.eql(\"Mike\");",
"});",
"pm.test(\"First customer is called Pat\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData[0].firstname).to.eql(\"Pat\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:3000/customers",
"protocol": "http",
"host": [
"localhost"
],
"port": "3000",
"path": [
"customers"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}