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

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 () { ...@@ -21,19 +21,24 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
}) })
describe('error', function() { describe('error', function() {
it("gets triggered once an error occurs", function(done) { if (Support.getTestDialect() === 'sqlite') {
var sequelize = Support.createSequelizeInstance({ dialect: Support.getTestDialect() }) // 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 // lets overwrite the host to get an error
sequelize.config.username = 'foobarbaz' sequelize.config.username = 'foobarbaz'
sequelize sequelize
.transaction(function() {}) .transaction(function() {})
.error(function(err) { .error(function(err) {
expect(err).to.not.be.undefined expect(err).to.not.be.undefined
done() done()
}) })
}) })
}
}) })
describe('callback', function() { describe('callback', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!