Skip to content

Commit 5492e59

Browse files
committed
Add two basic tests for "inq" operator
1 parent 26d25d6 commit 5492e59

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/basic-querying.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,23 @@ describe('basic-querying', function() {
462462
});
463463
});
464464

465+
it('supports non-empty inq', function() {
466+
// note there is no record with seq=100
467+
return User.find({where: {seq: {inq: [0, 1, 100]}}})
468+
.then(function(result) {
469+
var seqsFound = result.map(function(r) { return r.seq; });
470+
should(seqsFound).eql([0, 1]);
471+
});
472+
});
473+
474+
it('supports empty inq', function() {
475+
return User.find({where: {seq: {inq: []}}})
476+
.then(function(result) {
477+
var seqsFound = result.map(function(r) { return r.seq; });
478+
should(seqsFound).eql([]);
479+
});
480+
});
481+
465482
var itWhenIlikeSupported = connectorCapabilities.ilike ? it : it.skip.bind(it);
466483

467484
itWhenIlikeSupported('should support "like" that is satisfied', function(done) {

0 commit comments

Comments
 (0)