Skip to content

Node.js based forum software built for the modern web

misc test fixes

barisusaklid94668216d1d
diff --git a/tests/database/hash.js b/tests/database/hash.js
index c5dc1d5d88..65d74c6757 100644
--- a/tests/database/hash.js
+++ b/tests/database/hash.js
@@ -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);
diff --git a/tests/database/list.js b/tests/database/list.js
index 3983285dae..8819a4c861 100644
--- a/tests/database/list.js
+++ b/tests/database/list.js
@@ -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) {
diff --git a/tests/database/sets.js b/tests/database/sets.js
index c109f62039..a7a23f4dd8 100644
--- a/tests/database/sets.js
+++ b/tests/database/sets.js
@@ -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);