test: add ldap group test
This commit is contained in:
+15
-3
@@ -204,10 +204,22 @@ describe('Groups', function () {
|
||||
groupObject = await groups.get(groupObject.id);
|
||||
expect(groupObject.name).to.be('kootam2');
|
||||
});
|
||||
});
|
||||
|
||||
it('cannot change ldap group name', async function () {
|
||||
const result = await groups.add({ name: 'ldap-kootam', source: 'ldap' });
|
||||
const [error] = await safe(groups.setName(result, 'ldap-kootam2'));
|
||||
describe('ldap group', function () {
|
||||
let ldapGroup;
|
||||
|
||||
before(async function () {
|
||||
ldapGroup = await groups.add({ name: 'ldap-kootam', source: 'ldap' });
|
||||
});
|
||||
|
||||
it('cannot change name', async function () {
|
||||
const [error] = await safe(groups.setName(ldapGroup, 'ldap-kootam2'));
|
||||
expect(error.reason).to.be(BoxError.BAD_STATE);
|
||||
});
|
||||
|
||||
it('cannot set members', async function () {
|
||||
const [error] = await safe(groups.setMembers(ldapGroup, [ admin.id ], { skipSourceSkip: false }));
|
||||
expect(error.reason).to.be(BoxError.BAD_STATE);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user