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

Commit 8a81de1e by Daniel Durante

Fixed tests.

1 parent c55da04d
......@@ -138,7 +138,7 @@ module.exports = (function() {
return false
}
return [1].split('_').splice(1)
return match[1].split('_').splice(1)
}
},
......
......@@ -200,7 +200,6 @@ module.exports = (function() {
return Utils._.template(query)(replacements)
},
<<<<<<< HEAD
selectQuery: function(tableName, options, factory) {
var table = null,
joinQuery = ""
......
......@@ -164,7 +164,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
var UserTable = this.sequelize.define('UserCol', {
aNumber: {
type: Sequelize.INTEGER,
defaultValue: defaultFunction
defaultValue: defaultFunction
}
}, { timestamps: true })
......@@ -620,6 +620,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
})
it("casts empty array correct for postgres update", function(done) {
if (dialect !== "postgres") {
expect('').to.equal('')
......@@ -653,8 +654,8 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
User.sync({ force: true }).on('sql', function(sql) {
expect(sql).to.match(/UNIQUE \(username, email\)/)
expect(sql).to.match(/UNIQUE \(aCol, bCol\)/)
expect(sql).to.match(/UNIQUE\s*(uniq_UserWithUniqueUsernames_username_email)?\s*\([`"]?username[`"]?, [`"]?email[`"]?\)/)
expect(sql).to.match(/UNIQUE\s*(uniq_UserWithUniqueUsernames_aCol_bCol)?\s*\([`"]?aCol[`"]?, [`"]?bCol[`"]?\)/)
done()
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!