From 5492e592079b1d19a69670d807a97efa0e44b1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 19 Jan 2017 13:33:39 +0100 Subject: [PATCH] Add two basic tests for "inq" operator --- test/basic-querying.test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/basic-querying.test.js b/test/basic-querying.test.js index 89b71731..03da990d 100644 --- a/test/basic-querying.test.js +++ b/test/basic-querying.test.js @@ -462,6 +462,23 @@ describe('basic-querying', function() { }); }); + it('supports non-empty inq', function() { + // note there is no record with seq=100 + return User.find({where: {seq: {inq: [0, 1, 100]}}}) + .then(function(result) { + var seqsFound = result.map(function(r) { return r.seq; }); + should(seqsFound).eql([0, 1]); + }); + }); + + it('supports empty inq', function() { + return User.find({where: {seq: {inq: []}}}) + .then(function(result) { + var seqsFound = result.map(function(r) { return r.seq; }); + should(seqsFound).eql([]); + }); + }); + var itWhenIlikeSupported = connectorCapabilities.ilike ? it : it.skip.bind(it); itWhenIlikeSupported('should support "like" that is satisfied', function(done) {