修改邀请好友的测试

This commit is contained in:
liangtongchuan
2021-03-27 13:56:36 +08:00
parent 5fae5ab241
commit ed5bde77e0
2 changed files with 34 additions and 1 deletions

View File

@@ -59,6 +59,39 @@ describe('好友测试测试', function() {
});
});
it('清空申请', function(done) {
pinusClientT.request('role.friendHandler.getApplyList', {}, (res) => {
checkSuccessResponse(res);
expect(res.data.list).to.be.a('array');
res.data.list.forEach(cur => {
checkFriendApplyParams(cur);
});
const applyCodes = res.data.list.map(apply => {
return apply.applyCode;
});
pinusClientT.request('role.friendHandler.handleApply', { applyCodeList: applyCodes, isPass: false }, (res) => {
checkSuccessResponse(res);
expect(res.data.isSuccess).to.be.a('boolean');
expect(res.data.msg).to.be.a('string');
expect(res.data.applyCodeList).to.be.a('array');
res.data.applyCodeList.forEach(cur => {
expect(cur).to.be.a('string');
})
expect(res.data.list).to.be.a('array');
res.data.list.forEach(cur => {
checkFriendListParam(cur);
});
expect(res.data.friendCnt).to.be.a('number');
done();
});
});
});
it('申请好友', function(done) {
pinusClient.request('role.friendHandler.applyFriend', { roleIds: [roleInfoT.roleId] } , (res) => {
checkSuccessResponse(res);