misc test fixes

v1.18.x
barisusakli 10 years ago
parent 4554ef2195
commit d94668216d

@ -67,7 +67,7 @@ describe('Hash methods', function() {
describe('getObjects()', function() {
before(function(done) {
async([
async.parallel([
async.apply(db.setObject, 'testObject4', {name: 'baris'}),
async.apply(db.setObjectField, 'testObject5', 'name', 'ginger')
], done);

@ -144,7 +144,7 @@ describe('List methods', function() {
return done(err);
}
db.listTrim('testList6testList6', 0, 2, function(err) {
db.listTrim('testList6', 0, 2, function(err) {
assert.equal(err, null);
assert.equal(arguments.length, 1);
db.getListRange('testList6', 0, -1, function(err, list) {

@ -143,7 +143,7 @@ describe('Set methods', function() {
});
it('should return the element count of set', function(done) {
db.setCount('testSet', function(err, count) {
db.setCount('testSet5', function(err, count) {
assert.equal(err, null);
assert.equal(arguments.length, 2);
assert.strictEqual(count, 5);
@ -155,14 +155,14 @@ describe('Set methods', function() {
describe('setsCount()', function() {
before(function(done) {
async.parallel([
async.apply(db.setAdd, 'set4', [1,2,3,4,5]),
async.apply(db.setAdd, 'set5', 1),
async.apply(db.setAdd, 'set6', 2)
async.apply(db.setAdd, 'set5', [1,2,3,4,5]),
async.apply(db.setAdd, 'set6', 1),
async.apply(db.setAdd, 'set7', 2)
], done);
});
it('should return the element count of sets', function(done) {
db.setsCount(['set4', 'set5', 'set6', 'doesnotexist'], function(err, counts) {
db.setsCount(['set5', 'set6', 'set7', 'doesnotexist'], function(err, counts) {
assert.equal(err, null);
assert.equal(arguments.length, 2);
assert.equal(Array.isArray(counts), true);

Loading…
Cancel
Save