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

Commit 9051fcc6 by Sascha Depold

Ensure that the used connection is always the one of the transaction

1 parent 01fcc3b8
Showing with 6 additions and 1 deletions
...@@ -90,7 +90,9 @@ describe(Support.getTestDialectTeaser("HasOne"), function() { ...@@ -90,7 +90,9 @@ describe(Support.getTestDialectTeaser("HasOne"), function() {
User.create({ username: 'foo' }).success(function(user) { User.create({ username: 'foo' }).success(function(user) {
Group.create({ name: 'bar' }).success(function(group) { Group.create({ name: 'bar' }).success(function(group) {
sequelize.transaction(function(t) { sequelize.transaction(function(t) {
group.setUser(user, { transaction: t }).success(function() { group
.setUser(user, { transaction: t })
.success(function() {
Group.all().success(function(groups) { Group.all().success(function(groups) {
groups[0].getUser().success(function(associatedUser) { groups[0].getUser().success(function(associatedUser) {
expect(associatedUser).to.be.null expect(associatedUser).to.be.null
...@@ -98,6 +100,9 @@ describe(Support.getTestDialectTeaser("HasOne"), function() { ...@@ -98,6 +100,9 @@ describe(Support.getTestDialectTeaser("HasOne"), function() {
}) })
}) })
}) })
.on('sql', function(sql, uuid) {
expect(uuid).to.not.equal('default')
})
}) })
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!