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

Commit c428e40a by Willyham

Fix and simplify tests

1 parent 06aa7aae
......@@ -35,7 +35,7 @@ describe('Connction Manager', function() {
var options = {
replication: null
};
var sequelize = Support.getSequelizeInstance(baseConf.database, baseConf.username, baseConf.password, options);
var sequelize = Support.createSequelizeInstance(options);
var connectionManager = new ConnectionManager(Support.getTestDialect(), sequelize);
var poolSpy = sandbox.spy(Pooling, "Pool");
......@@ -50,7 +50,7 @@ describe('Connction Manager', function() {
read: [_.clone(poolEntry), _.clone(poolEntry)]
}
};
var sequelize = Support.getSequelizeInstance(baseConf.database, baseConf.username, baseConf.password, options);
var sequelize = Support.createSequelizeInstance(options);
var connectionManager = new ConnectionManager(Support.getTestDialect(), sequelize);
var poolSpy = sandbox.spy(Pooling, "Pool");
......@@ -70,7 +70,7 @@ describe('Connction Manager', function() {
read: [slave1, slave2]
}
};
var sequelize = Support.getSequelizeInstance(baseConf.database, baseConf.username, baseConf.password, options);
var sequelize = Support.createSequelizeInstance(options);
var connectionManager = new ConnectionManager(Support.getTestDialect(), sequelize);
var resolvedPromise = new Promise(function(resolve) {
......@@ -112,7 +112,7 @@ describe('Connction Manager', function() {
read: [_.clone(poolEntry)]
}
};
var sequelize = Support.getSequelizeInstance(baseConf.database, baseConf.username, baseConf.password, options);
var sequelize = Support.createSequelizeInstance(options);
var connectionManager = new ConnectionManager(Support.getTestDialect(), sequelize);
var resolvedPromise = new Promise(function(resolve) {
......
......@@ -77,10 +77,9 @@ describe(Support.getTestDialectTeaser('Sequelize#transaction'), function() {
// how could we enforce an authentication error in sqlite?
} else {
it('gets triggered once an error occurs', function(done) {
var sequelize = Support.createSequelizeInstance();
// lets overwrite the host to get an error
sequelize.config.username = 'foobarbaz';
// Supply bad config to force an error
var sequelize = Support.getSequelizeInstance('this', 'is', 'fake config');
sequelize
.transaction().then(function() {})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!