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

Commit 4a90430b by David Rivera

added test case for sequelize.import

1 parent dc4ddf7b
Showing with 9 additions and 0 deletions
...@@ -380,6 +380,15 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () { ...@@ -380,6 +380,15 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
expect(Project).to.exist expect(Project).to.exist
done() done()
}) })
it("imports a dao definition from a function", function(done) {
var Project = this.sequelize.import('Project', function(sequelize, DataTypes) {
return sequelize.define('Project' + parseInt(Math.random() * 9999999999999999), {
name: DataTypes.STRING
})
})
expect(Project).to.exist
done()
})
}) })
describe('define', function() { describe('define', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!