feat(server): add test

This commit is contained in:
金海洋 2023-08-11 18:29:11 +08:00
parent 77b443273d
commit 770d0c7a87
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,29 @@
###
POST {{host}}/api/message/push
Accept: application/json
Content-Type: application/json
{
"bizId": 70871687955606669,
"ext": "{}",
"fromId": 1,
"moduleId": 51,
"msgParams": {
"projectName": "枢智项目"
},
"receiveType": "cm_leader",
"versionCode": 331,
"relationId": 360,
"routerParams": {},
"templateCode": "flow-refuse",
"tenantId": 55,
"terminalId": 0,
"terminalType": "UNKNOWN",
"toId": [
65550
],
"type": "GENERAL_MESSAGE"
}
> reponse-check.js

View File

@ -0,0 +1,7 @@
client.test("request executed successful", function () {
client.assert(response.status == 200, "Response status is not 200")
});
client.test("response body status successful", function () {
client.assert(response.body.code == 0, "Response body code is not 0")
});

View File

@ -0,0 +1,8 @@
{
"local": {
"host": "http://localhost:8080"
},
"dev": {
"host": "https://dev.protossapi.linkzo.cn/"
}
}