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

Commit 0eb7d961 by Sascha Depold

minor adjustment

1 parent 8ff31c80
Showing with 4 additions and 1 deletions
...@@ -3578,7 +3578,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -3578,7 +3578,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
this.sequelize.getQueryInterface().dropTable('posts', { force: true }).success(function() { this.sequelize.getQueryInterface().dropTable('posts', { force: true }).success(function() {
self.sequelize.getQueryInterface().dropTable('authors', { force: true }).success(function() { self.sequelize.getQueryInterface().dropTable('authors', { force: true }).success(function() {
self.Author = self.sequelize.define('author', { firstName: Sequelize.STRING }) self.Author = self.sequelize.define('author', { firstName: Sequelize.STRING })
self.Author.sync({ force: true }).success(function() { self.Author.sync().success(function() {
done() done()
}) })
}) })
...@@ -3609,6 +3609,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -3609,6 +3609,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
this.Author.hasMany(Post) this.Author.hasMany(Post)
Post.belongsTo(this.Author) Post.belongsTo(this.Author)
// The posts table gets dropped in the before filter.
Post.sync().on('sql', function(sql) { Post.sync().on('sql', function(sql) {
if (dialect === 'postgres') { if (dialect === 'postgres') {
expect(sql).to.match(/"authorId" INTEGER REFERENCES "authors" \("id"\)/) expect(sql).to.match(/"authorId" INTEGER REFERENCES "authors" \("id"\)/)
...@@ -3638,6 +3639,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -3638,6 +3639,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
this.Author.hasMany(Post) this.Author.hasMany(Post)
Post.belongsTo(this.Author) Post.belongsTo(this.Author)
// The posts table gets dropped in the before filter.
Post.sync().on('sql', function(sql) { Post.sync().on('sql', function(sql) {
if (dialect === 'postgres') { if (dialect === 'postgres') {
expect(sql).to.match(/"authorId" INTEGER REFERENCES "authors" \("id"\)/) expect(sql).to.match(/"authorId" INTEGER REFERENCES "authors" \("id"\)/)
...@@ -3667,6 +3669,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -3667,6 +3669,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
this.Author.hasMany(Post) this.Author.hasMany(Post)
Post.belongsTo(this.Author) Post.belongsTo(this.Author)
// The posts table gets dropped in the before filter.
Post.sync().success(function() { Post.sync().success(function() {
if (dialect === 'sqlite') { if (dialect === 'sqlite') {
// sorry ... but sqlite is too stupid to understand whats going on ... // sorry ... but sqlite is too stupid to understand whats going on ...
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!