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

@@ -7,7 +7,7 @@ import {
describe('POST /group/:groupId/remove-manager', () => {
let leader; let nonLeader; let
groupToUpdate;
const groupName = 'Test Public Guild';
const groupName = 'Test Private Guild';
const groupType = 'guild';
let nonManager;
@@ -20,9 +20,10 @@ describe('POST /group/:groupId/remove-manager', () => {
groupDetails: {
name: groupName,
type: groupType,
privacy: 'public',
privacy: 'private',
},
members: 2,
upgradeToGroupPlan: true,
});
groupToUpdate = group;
@@ -83,7 +84,7 @@ describe('POST /group/:groupId/remove-manager', () => {
await nonLeader.sync();
expect(nonLeader.notifications.length).to.equal(0);
expect(nonLeader.notifications.length).to.equal(1); // user gets mystery items
expect(updatedGroup.managers[nonLeader._id]).to.not.exist;
});
});