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

Commit 0ec26180 by Sushant Committed by Jan Aagaard Meier

(tests) dialect needs to be supplied explicitly

1 parent 52a675a5
Showing with 19 additions and 2 deletions
......@@ -3,9 +3,26 @@
/* jshint -W030 */
var chai = require('chai')
, expect = chai.expect
, Sequelize = require(__dirname + '/../../index');
, Support = require(__dirname + '/support')
, Sequelize = Support.Sequelize;
describe('Sequelize constructor', function () {
describe('options', function() {
it('throw error when no dialect is supplied', function() {
expect(function() {
new Sequelize('localhost', 'test', 'test');
}).to.throw(Error);
});
it('works when dialect explicitly supplied', function() {
expect(function() {
new Sequelize('localhost', 'test', 'test', {
dialect: 'mysql'
});
}).not.to.throw(Error);
});
});
describe('sequelize constructor', function () {
it('should support database, username, password, options', function () {
var database = Math.random().toString()
, username = Math.random().toString()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!