Add direct copmarison value for array matching

This commit is contained in:
Laurent Villeneuve 2015-08-27 23:56:49 -04:00
parent 632898b022
commit cb78c8ef96
1 changed files with 15 additions and 2 deletions

View File

@ -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) {