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

Commit 8396641b by sdepold

specs

1 parent 47f470c6
Showing with 9 additions and 10 deletions
...@@ -464,6 +464,15 @@ describe('ModelFactory', function() { ...@@ -464,6 +464,15 @@ describe('ModelFactory', function() {
}) })
}) })
}) })
})
describe('Mixin', function() {
var ModelFactory = require("../lib/model-factory")
it("adds the mixed-in functions to the model", function() {
expect(ModelFactory.prototype.hasOne).toBeDefined()
expect(ModelFactory.prototype.hasMany).toBeDefined()
expect(ModelFactory.prototype.belongsTo).toBeDefined()
})
}) })
}) })
var assert = require("assert")
, ModelFactory = require("./../../lib/model-factory")
module.exports = {
'mixin should be correctly added to the model': function() {
assert.isDefined(ModelFactory.prototype.hasOne)
assert.isDefined(ModelFactory.prototype.hasMany)
assert.isDefined(ModelFactory.prototype.belongsTo)
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!