fix increment to use data

This commit is contained in:
Barış Soner Uşaklı
2018-01-03 14:24:07 -05:00
parent baa868cf2b
commit 87d40e9e78
2 changed files with 18 additions and 2 deletions

View File

@@ -149,6 +149,21 @@ describe('Key methods', function () {
done();
});
});
it('should set then increment a key', function (done) {
db.set('myIncrement', 1, function (err) {
assert.ifError(err);
db.increment('myIncrement', function (err, value) {
assert.ifError(err);
assert.equal(value, 2);
db.get('myIncrement', function (err, value) {
assert.ifError(err);
assert.equal(value, 2);
done();
});
});
});
});
});
describe('rename', function () {