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

Commit 0ec26180 by Sushant Committed by Jan Aagaard Meier

(tests) dialect needs to be supplied explicitly

1 parent 52a675a5
Showing with 20 additions and 4 deletions
...@@ -3,9 +3,26 @@ ...@@ -3,9 +3,26 @@
/* jshint -W030 */ /* jshint -W030 */
var chai = require('chai') var chai = require('chai')
, expect = chai.expect , 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 () { it('should support database, username, password, options', function () {
var database = Math.random().toString() var database = Math.random().toString()
, username = Math.random().toString() , username = Math.random().toString()
...@@ -65,4 +82,4 @@ describe('sequelize constructor', function () { ...@@ -65,4 +82,4 @@ describe('sequelize constructor', function () {
expect(sequelize.config.host).to.equal(host); expect(sequelize.config.host).to.equal(host);
expect(sequelize.config.port).to.equal(port); expect(sequelize.config.port).to.equal(port);
}); });
}); });
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!