Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test for min>max condition.

  • Loading branch information...
commit cba60654328ea70d2160b879564074bfaeb82570 1 parent f3b1198
Ju-yeong Park authored committed
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();
+ });
+ });
+ },
};
Please sign in to comment.
Something went wrong with that request. Please try again.