创建公会

This commit is contained in:
luying
2021-01-18 21:05:25 +08:00
parent 97216647b2
commit 3c35852495
17 changed files with 281 additions and 37 deletions

View File

@@ -56,6 +56,51 @@ describe('军团测试', function() {
done();
});
it('创建军团', function (done) {
pinusClient.request('battle.guildHandler.createGuild', { name: "test", icon: 1, notice: "notice" }, (res) => {
console.log(JSON.stringify(res))
// 消息回调
expect(res).to.be.an('object');
expect(res.code).equal(0);
expect(res.data).to.be.an('object');
expect(res.data).to.have.deep.property('code').that.is.an('string');
expect(res.data).to.have.deep.property('name').that.is.an('string');
expect(res.data).to.have.deep.property('icon').that.is.an('number');
expect(res.data).to.have.deep.property('notice').that.is.an('string');
expect(res.data).to.have.deep.property('introduce').that.is.an('string');
expect(res.data).to.have.deep.property('rank').that.is.an('number');
expect(res.data).to.have.deep.property('lv').that.is.an('number');
expect(res.data).to.have.deep.property('fund').that.is.an('number');
expect(res.data).to.have.deep.property('peopleNum').that.is.an('number');
expect(res.data).to.have.deep.property('manageNum').that.is.an('number');
expect(res.data).to.have.deep.property('activeDaily').that.is.an('number');
expect(res.data).to.have.deep.property('activeWeekly').that.is.an('number');
expect(res.data).to.have.deep.property('ceCondition').that.is.an('number');
expect(res.data).to.have.deep.property('isAuto').that.is.an('boolean');
expect(res.data).to.have.deep.property('leader').that.is.an('object');
expect(res.data.leader).to.have.deep.property('name').that.is.an('string');
expect(res.data.leader).to.have.deep.property('sHid').that.is.an('number');
expect(res.data.leader).to.have.deep.property('headHid').that.is.an('number');
expect(res.data.leader).to.have.deep.property('lv').that.is.an('number');
expect(res.data.leader).to.have.deep.property('loginTime').that.is.an('number');
expect(res.data).to.have.deep.property('myInfo').that.is.an('object');
expect(res.data.myInfo).to.have.deep.property('honour').that.is.an('number');
expect(res.data.myInfo).to.have.deep.property('active').that.is.an('number');
expect(res.data.myInfo).to.have.deep.property('job').that.is.an('number');
expect(res.data.myInfo).to.have.deep.property('auth').that.is.an('number');
expect(res.data).to.have.deep.property('structure').that.is.an('array');
res.data.structure.forEach(list => {
expect(list).to.have.deep.property('id').that.is.a('number');
expect(list).to.have.deep.property('lv').that.is.a('number');
});
done();
});
});
it('获取军团列表', function(done) {
pinusClient.request('battle.guildHandler.getGuildList', {page:1, showPeopleMax: true, name: ""} , (res) => {
console.log(JSON.stringify(res))