Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 8396641b
authored
Dec 19, 2011
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specs
1 parent
47f470c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
spec/model-factory.spec.js
test/Model/mixin.js
spec/model-factory.spec.js
View file @
8396641
...
@@ -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
()
})
})
})
})
})
test/Model/mixin.js
deleted
100644 → 0
View file @
47f470c
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
)
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment