不要怂,就是干,撸起袖子干!

Commit 34b680d8 by Daniel Durante

Forgot to add a done() callback as well as improperly calling updateAttributes.

1 parent 40833872
Showing with 3 additions and 3 deletions
......@@ -743,7 +743,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
}) // - bulkCreate
describe('update', function() {
it('allows sql logging of updated statements', function() {
it('allows sql logging of updated statements', function(done) {
var User = this.sequelize.define('User', {
name: Sequelize.STRING,
bio: Sequelize.TEXT
......@@ -754,8 +754,8 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
this.sequelize.sync({ force: true }).success(function() {
User.create({ name: 'meg', bio: 'none' }).success(function(u) {
expect(u).toBeDefined()
expect(u).not.toBe(null)
u.setAttributes({name: 'brian'}).on('sql', function(sql) {
expect(u).not.toBeNull()
u.updateAttributes({name: 'brian'}).on('sql', function(sql) {
expect(sql).toBeDefined()
expect(sql.toUpperCase().indexOf("UPDATE")).toBeGreaterThan(-1)
done()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!