Add direct copmarison value for array matching
This commit is contained in:
parent
632898b022
commit
cb78c8ef96
|
@ -309,10 +309,10 @@ describe('Memory connector', function() {
|
|||
});
|
||||
});
|
||||
|
||||
it('should successfully extract 2 users matching array values', function (done) {
|
||||
it('should successfully extract 2 users matching over array values', function (done) {
|
||||
User.find({
|
||||
where: {
|
||||
'children': {
|
||||
children: {
|
||||
regexp: /an/
|
||||
}
|
||||
}
|
||||
|
@ -325,6 +325,19 @@ describe('Memory connector', function() {
|
|||
});
|
||||
});
|
||||
|
||||
it('should successfully extract 1 users matching over array values', function (done) {
|
||||
User.find({
|
||||
where: {
|
||||
children: 'Dhani'
|
||||
}
|
||||
}, function (err, users) {
|
||||
should.not.exist(err);
|
||||
users.length.should.be.equal(1);
|
||||
users[0].name.should.be.equal('George Harrison');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should count using date string', function(done) {
|
||||
User.count({birthday: {lt: new Date(1990,0).toISOString()}},
|
||||
function(err, count) {
|
||||
|
|
Loading…
Reference in New Issue