Fix the test cases as now inq/nin is checked for array values

This commit is contained in:
Raymond Feng 2014-06-26 23:48:48 -07:00
parent 61ede028f0
commit 5236cfeeca
1 changed files with 3 additions and 3 deletions

View File

@ -362,7 +362,7 @@ describe('mysql', function () {
function (err, post) { function (err, post) {
Post.create({title: 'My Post2', content: 'Hello', stars: 20}, Post.create({title: 'My Post2', content: 'Hello', stars: 20},
function (err, post) { function (err, post) {
Post.find({where: {title: {inq: 'SELECT title from PostWithDefaultId'}}}, Post.find({where: {title: {inq: ['SELECT title from PostWithDefaultId']}}},
function (err, posts) { function (err, posts) {
should.not.exist(err); should.not.exist(err);
posts.should.have.property('length', 0); posts.should.have.property('length', 0);
@ -392,7 +392,7 @@ describe('mysql', function () {
function (err, post) { function (err, post) {
Post.create({title: 'My Post2', content: 'Hello', stars: 20}, Post.create({title: 'My Post2', content: 'Hello', stars: 20},
function (err, post) { function (err, post) {
Post.find({where: {title: {nin: 'SELECT title from PostWithDefaultId'}}}, Post.find({where: {title: {nin: ['SELECT title from PostWithDefaultId']}}},
function (err, posts) { function (err, posts) {
should.not.exist(err); should.not.exist(err);
posts.should.have.property('length', 2); posts.should.have.property('length', 2);
@ -408,7 +408,7 @@ describe('mysql', function () {
function (err, post) { function (err, post) {
Post.create({title: 'My Post2', content: 'Hello', stars: 20}, Post.create({title: 'My Post2', content: 'Hello', stars: 20},
function (err, post) { function (err, post) {
Post.find({where: {stars: {inq: 'SELECT title from PostWithDefaultId'}}}, Post.find({where: {stars: {inq: ['SELECT title from PostWithDefaultId']}}},
function (err, posts) { function (err, posts) {
should.not.exist(err); should.not.exist(err);
posts.should.have.property('length', 0); posts.should.have.property('length', 0);