mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 03:27:01 +02:00
closes #5692
This commit is contained in:
@@ -190,6 +190,15 @@ describe('Hash methods', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should return undefined for all fields if object does not exist', function (done) {
|
||||
db.getObjectsFields(['doesnotexist1', 'doesnotexist2'], ['name', 'age'], function (err, data) {
|
||||
assert.ifError(err);
|
||||
assert.equal(data.name, null);
|
||||
assert.equal(data.age, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getObjectKeys()', function () {
|
||||
|
||||
@@ -303,6 +303,7 @@ describe('Sorted Set methods', function () {
|
||||
assert.equal(err, null);
|
||||
assert.equal(arguments.length, 2);
|
||||
assert.equal(!!score, false);
|
||||
assert.strictEqual(score, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -312,6 +313,7 @@ describe('Sorted Set methods', function () {
|
||||
assert.equal(err, null);
|
||||
assert.equal(arguments.length, 2);
|
||||
assert.equal(!!score, false);
|
||||
assert.strictEqual(score, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user