Permalink
Browse files

Added test for bug #74.

  • Loading branch information...
1 parent 87642c5 commit f3b1198abd90182bfedf5ce8bc297d235b1d30c1 Ju-yeong Park committed with Jan 2, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/findTests.js
View
@@ -1013,6 +1013,19 @@ loadArray: function (t) {
t.same(sorted_ids, ids, 'Sorting went wrong.');
t.done();
});
+ },
+
+ "provided empty list": function (t) {
+ t.expect(2);
+
+ UserFindMockup.sort({
+ field: 'number',
+ limit: [0, 10]
+ }, [], function(err, ids) {
+ t.same(null, err, 'Sorting caused an error: '+err);
+ t.same(0, ids.length, 'Sorting went wrong when ids.length is 0.');
+ t.done();
+ });
}
},

0 comments on commit f3b1198

Please sign in to comment.