Added initial get group tests

This commit is contained in:
Keith Holliday
2016-01-21 10:38:43 -06:00
parent 13693a041a
commit ab5fc1f526
3 changed files with 334 additions and 0 deletions

View File

@@ -59,6 +59,31 @@ export class ApiGroup extends ApiObject {
this._docType = 'groups';
}
async addChat (chat) {
let group = this;
if (!chat) {
chat = {
id: 'Test_ID',
text: 'Test message',
flagCount: 0,
timestamp: Date(),
likes: {},
flags: {},
uuid: group.leader,
contributor: {},
backer: {},
user: group.leader,
};
}
let update = { chat };
this.update(update, '$push');
return this;
}
}
export class ApiChallenge extends ApiObject {