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

Commit e913ba3f by Mick Hansen

Merge branch 'master' of github.com:sequelize/sequelize

2 parents 94d1b122 34f4f8c8
......@@ -34,6 +34,7 @@ AbstractDialect.prototype.supports = {
schemas: false,
transactions: true,
migrations: true,
upserts: true,
constraints: {
restrict: true
},
......
......@@ -12,7 +12,8 @@ var chai = require('chai')
, dialect = Support.getTestDialect()
, datetime = require('chai-datetime')
, _ = require('lodash')
, assert = require('assert');
, assert = require('assert')
, current = Support.sequelize;
chai.use(datetime);
chai.config.includeStack = true;
......@@ -40,6 +41,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
this.clock.restore();
});
if (current.dialect.supports.upserts) {
describe('upsert', function () {
it('works with upsert on id', function () {
return this.User.upsert({ id: 42, username: 'john' }).bind(this).then(function (created) {
......@@ -91,4 +93,6 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
});
});
});
}
});
......@@ -232,7 +232,7 @@ describe(Support.getTestDialectTeaser("Promise"), function () {
.then(function() {
return Book
.find({
where: (dialect === 'postgres' ? '"Book"."id"=' : '`Book`.`id`=') + book.id,
where: {id: book.id},
include: [Page]
})
.then(function (leBook) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!