mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 03:09:22 +02:00
test: add test to verify that a sorted set is automatically deleted if its last element is removed
This commit is contained in:
@@ -1085,6 +1085,11 @@ describe('Sorted Set methods', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not think the sorted set exists if the last element is removed', async () => {
|
||||
await db.sortedSetRemove('sorted3', 'value1');
|
||||
assert.strictEqual(await db.exists('sorted3'), false);
|
||||
});
|
||||
|
||||
it('should remove multiple values from multiple keys', (done) => {
|
||||
db.sortedSetAdd('multiTest1', [1, 2, 3, 4], ['one', 'two', 'three', 'four'], (err) => {
|
||||
assert.ifError(err);
|
||||
|
||||
Reference in New Issue
Block a user