expect(self.sequelize.query('SELECT 1+1',{transaction:t,raw:true})).to.eventually.be.rejectedWith(/commit has been called on this transaction\([^)]+\), you can no longer use it/)
);
});
})
).to.be.eventually.fulfilled;
});
it('does not allow queries after rollback',function(){
it('does not allow queries after rollback',function(){
it('does not allow queries immediatly after rollback call',function(){
varself=this;
returnexpect(
this.sequelize.transaction().then(function(t){
returnPromise.join(
expect(t.rollback()).to.eventually.be.fulfilled,
expect(self.sequelize.query('SELECT 1+1',{transaction:t,raw:true})).to.eventually.be.rejectedWith(/rollback has been called on this transaction\([^)]+\), you can no longer use it/)
);
})
).to.eventually.be.fulfilled;
});
it('does not allow commits after commit',function(){
it('does not allow commits after commit',function(){