fix: #8069, dont show hidden groups in search

This commit is contained in:
Baris Usakli
2019-11-29 13:35:50 -05:00
parent 33fd4a1c2b
commit c2cd7de891
3 changed files with 18 additions and 2 deletions

View File

@@ -196,6 +196,15 @@ describe('Groups', function () {
done();
});
});
it('should not return hidden groups', async function () {
await Groups.create({
name: 'hiddenGroup',
hidden: '1',
});
const result = await socketGroups.search({ uid: testUid }, { query: 'hiddenGroup' });
assert.equal(result.length, 0);
});
});
describe('.isMember()', function () {