From fd1ce7a7b5c08dff3765882b5f0385da8e0a2bff Mon Sep 17 00:00:00 2001 From: Cody Stoltman Date: Thu, 4 Feb 2016 16:24:01 -0600 Subject: [PATCH] adds test for search by dates that are actually strings --- .../queryable/modifiers/greaterThan.modifier.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interfaces/queryable/modifiers/greaterThan.modifier.test.js b/interfaces/queryable/modifiers/greaterThan.modifier.test.js index 09082ee..74dd001 100644 --- a/interfaces/queryable/modifiers/greaterThan.modifier.test.js +++ b/interfaces/queryable/modifiers/greaterThan.modifier.test.js @@ -263,6 +263,16 @@ describe('Queryable Interface', function() { }); }); + it('should return records with symbolic usage >= usage when searching dates as strings', function(done) { + Queryable.User.find({ type: testName, dob: { '>=': 'Sat Nov 09 2013 00:00:00 GMT-0600 (CST)' }}).sort('first_name').exec(function(err, users) { + assert(!err); + assert(Array.isArray(users)); + assert.strictEqual(users.length, 2); + assert.equal(users[0].first_name, 'greaterThanOrEqual_dates_user8'); + done(); + }); + }); + }); describe('strings', function() {