From c3fc4a06bfd056c26504f5b3cfcd1b2b39c45a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 14 Jun 2018 17:24:29 -0400 Subject: [PATCH] test sortedSetUnion with scores --- test/database/sorted.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/database/sorted.js b/test/database/sorted.js index 948ab29f32..2b7babf951 100644 --- a/test/database/sorted.js +++ b/test/database/sorted.js @@ -584,6 +584,15 @@ describe('Sorted Set methods', function () { done(); }); }); + + it('should return an array of values and scores from both sorted sets sorted by scores lowest to highest', function (done) { + db.getSortedSetUnion({ sets: ['sortedSetTest2', 'sortedSetTest3'], start: 0, stop: -1, withScores: true }, function (err, data) { + assert.equal(err, null); + assert.equal(arguments.length, 2); + assert.deepEqual(data, [{ value: 'value1', score: 1 }, { value: 'value2', score: 2 }, { value: 'value4', score: 8 }]); + done(); + }); + }); }); describe('getSortedSetRevUnion()', function () {