mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
tests: check that memberCount is increased for public guilds too
This commit is contained in:
@@ -46,6 +46,14 @@ describe('POST /group/:groupId/join', () => {
|
|||||||
|
|
||||||
await expect(joiningUser.get(`/groups/${publicGuild._id}`)).to.eventually.have.deep.property('leader._id', joiningUser._id);
|
await expect(joiningUser.get(`/groups/${publicGuild._id}`)).to.eventually.have.deep.property('leader._id', joiningUser._id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('increments memberCount when joining guilds', async () => {
|
||||||
|
let oldMemberCount = guild.memberCount;
|
||||||
|
|
||||||
|
await joiningUser.post(`/groups/${publicGuild._id}/join`);
|
||||||
|
|
||||||
|
await expect(invitedUser.get(`/groups/${guild._id}`)).to.eventually.have.property('memberCount', oldMemberCount + 1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context('Joining a private guild', () => {
|
context('Joining a private guild', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user