fix(tests): create test teams properly, adjust expectations

This commit is contained in:
SabreCat
2022-06-09 15:06:51 -05:00
parent 0b1907fe07
commit 85c7c7ea57
19 changed files with 71 additions and 53 deletions

View File

@@ -139,7 +139,7 @@ describe('POST /user/class/cast/:spellId', () => {
});
it('returns an error if a group task was targeted', async () => {
const { group, groupLeader } = await createAndPopulateGroup();
const { group, groupLeader } = await createAndPopulateGroup({ upgradeToGroupPlan: true });
const groupTask = await groupLeader.post(`/tasks/group/${group._id}`, {
text: 'todo group',
@@ -266,7 +266,7 @@ describe('POST /user/class/cast/:spellId', () => {
});
it('searing brightness does not affect challenge or group tasks', async () => {
const guild = await generateGroup(user);
const guild = await generateGroup(user, {}, { 'purchased.plan.customerId': 'group-unlimited' });
const challenge = await generateChallenge(user, guild);
await user.post(`/challenges/${challenge._id}/join`);
await user.post(`/tasks/challenge/${challenge._id}`, {