groups show/hide test

v1.18.x
Barış Soner Uşaklı 9 years ago
parent f3cd9adec7
commit 84f23fc4f0

@ -296,6 +296,34 @@ describe('Groups', function() {
});
});
describe('.show()', function() {
it('should make a group visible', function(done) {
Groups.show('Test', function(err) {
assert.ifError(err);
assert.equal(arguments.length, 1);
db.isSortedSetMember('groups:visible:createtime', 'Test', function(err, isMember) {
assert.ifError(err);
assert.strictEqual(isMember, true);
done();
});
});
});
});
describe('.hide()', function() {
it('should make a group hidden', function(done) {
Groups.hide('Test', function(err) {
assert.ifError(err);
assert.equal(arguments.length, 1);
db.isSortedSetMember('groups:visible:createtime', 'Test', function(err, isMember) {
assert.ifError(err);
assert.strictEqual(isMember, false);
done();
});
});
});
});
after(function() {
db.flushdb();
});

Loading…
Cancel
Save