Skip to content
Browse files

Added test for min>max condition.

  • Loading branch information...
1 parent f3b1198 commit cba60654328ea70d2160b879564074bfaeb82570 Ju-yeong Park committed with
Showing with 20 additions and 1 deletion.
  1. +20 −1 test/findTests.js
View
21 test/findTests.js
@@ -1061,5 +1061,24 @@ loadArray: function (t) {
});
});
});
- }
+ },
+ findInDescendingOrder: function(t) {
+ var findUser = new UserFindMockup();
+ t.expect(2);
+
+ findUser.find({
+ number: {
+ min: 4,
+ max: '-inf',
+ endpoint: '(]',
+ limit: 1
+ }
+ }, function(err, ids) {
+ t.same(1, ids.length, 'Searching when min>max condition(ZREVRANGEBYSCORE) is invalid.');
+ findUser.load(ids[0], function(err) {
+ t.same(3, findUser.p('number'), 'Result of searching when min>max condition is invalid.');
+ t.done();
+ });
+ });
+ },
};

0 comments on commit cba6065

Please sign in to comment.
Something went wrong with that request. Please try again.