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

Commit 8c4acea7 by Sascha Depold

only exec the error test for non sqlite dialects

1 parent 8d343ba3
Showing with 16 additions and 11 deletions
......@@ -21,19 +21,24 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
})
describe('error', function() {
it("gets triggered once an error occurs", function(done) {
var sequelize = Support.createSequelizeInstance({ dialect: Support.getTestDialect() })
if (Support.getTestDialect() === 'sqlite') {
// not sure if we can test this in sqlite ...
// how could we enforce an authentication error in sqlite?
} else {
it("gets triggered once an error occurs", function(done) {
var sequelize = Support.createSequelizeInstance({ dialect: Support.getTestDialect() })
// lets overwrite the host to get an error
sequelize.config.username = 'foobarbaz'
// lets overwrite the host to get an error
sequelize.config.username = 'foobarbaz'
sequelize
.transaction(function() {})
.error(function(err) {
expect(err).to.not.be.undefined
done()
})
})
sequelize
.transaction(function() {})
.error(function(err) {
expect(err).to.not.be.undefined
done()
})
})
}
})
describe('callback', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!