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

Commit 8a81de1e by Daniel Durante

Fixed tests.

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