fix(tests): leave/reject/quests

This commit is contained in:
SabreCat
2023-08-01 16:53:48 -05:00
parent 150cd16b1c
commit d7071d6b4d
3 changed files with 194 additions and 273 deletions

View File

@@ -51,15 +51,13 @@ describe('POST /groups/:groupId/quests/invite/:questKey', () => {
});
it('does not issue invites for Guilds', async () => {
const { group } = await createAndPopulateGroup({
const { group, groupLeader } = await createAndPopulateGroup({
groupDetails: { type: 'guild', privacy: 'private' },
members: 1,
upgradeToGroupPlan: true,
});
const alternateGroup = group;
await expect(leader.post(`/groups/${alternateGroup._id}/quests/invite/${PET_QUEST}`)).to.eventually.be.rejected.and.eql({
await expect(groupLeader.post(`/groups/${group._id}/quests/invite/${PET_QUEST}`)).to.eventually.be.rejected.and.eql({
code: 401,
error: 'NotAuthorized',
message: t('guildQuestsNotSupported'),