externalldap: cannot set members of external group

This commit is contained in:
Girish Ramakrishnan
2024-02-28 14:38:42 +01:00
parent f98fe43843
commit e26f71b603
2 changed files with 13 additions and 2 deletions
+7 -2
View File
@@ -57,7 +57,7 @@ describe('Groups', function () {
expect(error).to.be(null);
group0Object = result;
[error, result] = await safe(groups.add({ name: group1Name, source: 'ldap' }));
[error, result] = await safe(groups.add({ name: group1Name}));
expect(error).to.be(null);
group1Object = result;
});
@@ -69,7 +69,7 @@ describe('Groups', function () {
});
it('cannot add existing group', async function () {
const [error] = await safe(groups.add({name: group0Name, source: 'ldap' }));
const [error] = await safe(groups.add({name: group0Name }));
expect(error.reason).to.be(BoxError.ALREADY_EXISTS);
});
});
@@ -222,5 +222,10 @@ describe('Groups', function () {
const [error] = await safe(groups.setMembers(ldapGroup, [ admin.id ], { skipSourceSkip: false }));
expect(error.reason).to.be(BoxError.BAD_STATE);
});
it('cannot set membership', async function () {
const [error] = await safe(groups.setMembership(admin, [ ldapGroup.id ]));
expect(error.reason).to.be(BoxError.BAD_STATE);
});
});
});