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

Commit 3b3c2d6c by Overlook Motel

test bad db connection details throws error

1 parent d3dd52d3
Showing with 15 additions and 0 deletions
...@@ -430,6 +430,21 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () { ...@@ -430,6 +430,21 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
done() done()
}) })
}) })
it('fails with incorrect database connection details', function (done) {
var sequelize = new Sequelize('db', 'user', 'pass', {
dialect: this.sequelize.options.dialect,
port: 99999
});
var Project = sequelize.define('Project', {title: Sequelize.STRING})
var Task = sequelize.define('Task', {title: Sequelize.STRING})
sequelize.sync({force: true}).done(function (err) {
expect(err).to.be.ok
done()
})
})
} }
describe("doesn't emit logging when explicitly saying not to", function() { describe("doesn't emit logging when explicitly saying not to", function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!