groups: remove unused addMember

This commit is contained in:
Girish Ramakrishnan
2024-01-19 17:25:36 +01:00
parent 06ce351d82
commit a8d37b917a
2 changed files with 0 additions and 36 deletions

View File

@@ -88,30 +88,6 @@ describe('Groups', function () {
expect(isMember).to.be(false);
});
it('can add member to the group', async function () {
await groups.addMember(group0Object.id, admin.id);
});
it('cannot add same member to the group', async function () {
const [error] = await safe(groups.addMember(group0Object.id, admin.id));
expect(error.reason).to.be(BoxError.ALREADY_EXISTS);
});
it('isMember returns true', async function () {
const isMember = await groups.isMember(group0Object.id, admin.id);
expect(isMember).to.be(true);
});
it('cannot add invalid user to group', async function () {
const [error] = await safe(groups.addMember(group0Object.id, 'random'));
expect(error.reason).to.be(BoxError.NOT_FOUND);
});
it('cannot add non-existent group', async function () {
const [error] = await safe(groups.addMember('randomgroup', admin.id));
expect(error.reason).to.be(BoxError.NOT_FOUND);
});
it('can set members', async function () {
await groups.setMembers(group0Object.id, [ admin.id, user.id ]);
});