add population to join and update routes of challenges and groups, remove chat flags info everywhere

This commit is contained in:
Matteo Pagliazzi
2016-02-03 11:29:19 +01:00
parent a8dc529449
commit 1daf87531a
9 changed files with 114 additions and 39 deletions

View File

@@ -35,9 +35,11 @@ describe('POST /group/:groupId/join', () => {
});
it('allows non-invited users to join public guilds', async () => {
await joiningUser.post(`/groups/${publicGuild._id}/join`);
let res = await joiningUser.post(`/groups/${publicGuild._id}/join`);
await expect(joiningUser.get('/user')).to.eventually.have.property('guilds').to.include(publicGuild._id);
expect(res.leader._id).to.eql(user._id);
expect(res.leader.profile.name).to.eql(user.profile.name);
});
it('promotes joining member in a public empty guild to leader', async () => {