Update broken test case

This commit is contained in:
Anatoliy Chakkaev 2013-01-23 07:48:56 +07:00
parent 785868962c
commit a5e84c9f32
1 changed files with 3 additions and 3 deletions

View File

@ -1434,12 +1434,12 @@ function testOrm(schema) {
it('should find or create', function (test) {
var email = 'some email ' + Math.random();
User.findOrCreate({where: {email: email, age: 23}}, function (err, u) {
User.findOrCreate({where: {email: email}}, function (err, u) {
test.ok(u);
test.equals(u.age, 23);
test.ok(!u.age);
User.findOrCreate({where: {email: email}}, {age: 21}, function (err, u2) {
test.equals(u.id.toString(), u2.id.toString(), 'Same user ids');
test.equals(u2.age, 23);
test.ok(!u2.age);
test.done();
});
});