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

Commit 46313bc1 by Sascha Depold

Wrap the test within prepareTransactionTest

1 parent 4ebe4bcc
Showing with 4 additions and 6 deletions
...@@ -118,9 +118,8 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () { ...@@ -118,9 +118,8 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
}) })
describe('complex long running example', function() { describe('complex long running example', function() {
it("works", function(done) { it("works with promise syntax", function(done) {
var sequelize = this.sequelize Support.prepareTransactionTest(this.sequelize, function(sequelize) {
var Test = sequelize.define('Test', { var Test = sequelize.define('Test', {
id: { type: Support.Sequelize.INTEGER, primaryKey: true, autoIncrement: true}, id: { type: Support.Sequelize.INTEGER, primaryKey: true, autoIncrement: true},
name: { type: Support.Sequelize.STRING } name: { type: Support.Sequelize.STRING }
...@@ -136,9 +135,7 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () { ...@@ -136,9 +135,7 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
setTimeout(function() { setTimeout(function() {
transaction transaction
.commit() .commit()
.then(function() { .then(function() { return Test.count() })
return Test.count({ transaction: transaction })
})
.then(function(count) { .then(function(count) {
expect(count).to.equal(1) expect(count).to.equal(1)
done() done()
...@@ -149,4 +146,5 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () { ...@@ -149,4 +146,5 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
}) })
}) })
}) })
})
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!