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

@@ -63,13 +63,21 @@ describe('PUT /challenges/:challengeId', () => {
});
expect(res.prize).to.equal(0);
expect(res.group).to.equal(privateGuild._id);
expect(res.group).to.eql({
_id: privateGuild._id,
privacy: privateGuild.privacy,
name: privateGuild.name,
type: privateGuild.type,
});
expect(res.memberCount).to.equal(2);
expect(res.tasksOrder).not.to.equal('new order');
expect(res.official).to.equal(false);
expect(res.shortName).not.to.equal('new short name');
expect(res.leader).to.equal(member._id);
expect(res.leader).to.eql({
_id: member._id,
profile: {name: member.profile.name},
});
expect(res.name).to.equal('New Challenge Name');
expect(res.description).to.equal('New challenge description.');
});