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

Commit 5fa778ea by Sascha Depold

added a test for tableName + enabled all tests again

1 parent ea83dd0f
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
- [FEATURE] minConnections option for MySQL pooling (thanks to dominiklessel) - [FEATURE] minConnections option for MySQL pooling (thanks to dominiklessel)
- [FEATURE] added BIGINT data type which is treated like a string (thanks to adamsch1) - [FEATURE] added BIGINT data type which is treated like a string (thanks to adamsch1)
- [FEATURE] https://github.com/sdepold/sequelize/pull/345 - [FEATURE] https://github.com/sdepold/sequelize/pull/345
- [FEATURE] allow definition of a models table name (thanks to slamkajs)
# v1.5.0 # # v1.5.0 #
- [REFACTORING] use underscore functions for Utils.isHash (thanks to Mick-Hansen/innofluence) - [REFACTORING] use underscore functions for Utils.isHash (thanks to Mick-Hansen/innofluence)
......
...@@ -69,6 +69,17 @@ describe('Sequelize', function() { ...@@ -69,6 +69,17 @@ describe('Sequelize', function() {
expect(typeof DAO.options.classMethods.localClassMethod).toEqual('function') expect(typeof DAO.options.classMethods.localClassMethod).toEqual('function')
expect(typeof DAO.options.instanceMethods.globalInstanceMethod).toEqual('function') expect(typeof DAO.options.instanceMethods.globalInstanceMethod).toEqual('function')
}) })
it("uses the passed tableName", function(done) {
var Photo = sequelize.define('Foto', { name: Sequelize.STRING }, { tableName: 'photos' })
Photo.sync({ force: true }).success(function() {
sequelize.getQueryInterface().showAllTables().success(function(tableNames) {
expect(tableNames).toInclude('photos')
done
})
})
})
}) })
describe('sync', function() { describe('sync', function() {
......
...@@ -10,7 +10,7 @@ if(typeof require === 'function') { ...@@ -10,7 +10,7 @@ if(typeof require === 'function') {
buster.spec.expose() buster.spec.expose()
buster.testRunner.timeout = 1000 buster.testRunner.timeout = 1000
describe('=>'+Helpers.getTestDialectTeaser("Migrator"), function() { describe(Helpers.getTestDialectTeaser("Migrator"), function() {
before(function(done) { before(function(done) {
this.init = function(options, callback) { this.init = function(options, callback) {
options = Helpers.Sequelize.Utils._.extend({ options = Helpers.Sequelize.Utils._.extend({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!