/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/
expect(err.message).to.match(/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);
expect(err.sql).to.equal('SELECT 1+1');
});
});
});
it('does not allow queries immediately after commit call',function(){
it('does not allow queries immediately after commit call',asyncfunction(){
/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/
expect(err.message).to.match(/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);
]);
expect(err.sql).to.equal('SELECT 1+1');
})).to.be.eventually.fulfilled;
})
);
});
})
).to.be.eventually.fulfilled;
});
});
it('does not allow queries after rollback',function(){
it('does not allow queries after rollback',function(){
...
@@ -186,18 +177,16 @@ if (current.dialect.supports.transactions) {
...
@@ -186,18 +177,16 @@ if (current.dialect.supports.transactions) {
.to.eventually.be.rejectedWith('Transaction cannot be rolled back because it never started');
.to.eventually.be.rejectedWith('Transaction cannot be rolled back because it never started');
});
});
it('does not allow queries immediately after rollback call',function(){
it('does not allow queries immediately after rollback call',asyncfunction(){
/rollback has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/
expect(err.message).to.match(/rollback has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);