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 cf637c52
authored
Aug 09, 2013
by
Daniel Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged master
1 parent
00de8764
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
test/dao.validations.test.js
test/dao.validations.test.js
View file @
cf637c5
...
@@ -292,6 +292,13 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
...
@@ -292,6 +292,13 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
})
})
})
})
it
(
'correctly throws an error using create method '
,
function
(
done
)
{
this
.
Project
.
create
({
name
:
'nope'
}).
error
(
function
(
err
)
{
expect
(
err
).
to
.
have
.
ownProperty
(
'name'
)
done
()
})
})
it
(
'correctly validates using create method '
,
function
(
done
)
{
it
(
'correctly validates using create method '
,
function
(
done
)
{
var
self
=
this
var
self
=
this
this
.
Project
.
create
({}).
success
(
function
(
project
)
{
this
.
Project
.
create
({}).
success
(
function
(
project
)
{
...
@@ -323,7 +330,7 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
...
@@ -323,7 +330,7 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
User
.
sync
({
force
:
true
}).
success
(
function
()
{
User
.
sync
({
force
:
true
}).
success
(
function
()
{
User
.
create
({
id
:
'helloworld'
}).
error
(
function
(
err
)
{
User
.
create
({
id
:
'helloworld'
}).
error
(
function
(
err
)
{
expect
(
err
).
to
.
deep
.
equal
({
id
:
[
'Invalid integer
: id
'
]})
expect
(
err
).
to
.
deep
.
equal
({
id
:
[
'Invalid integer'
]})
done
()
done
()
})
})
})
})
...
@@ -369,14 +376,6 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
...
@@ -369,14 +376,6 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
})
})
})
})
})
})
it
(
'correctly throws an error using create method '
,
function
(
done
)
{
var
self
=
this
this
.
Project
.
create
({
name
:
'nope'
}).
error
(
function
(
err
)
{
expect
(
err
).
to
.
have
.
ownProperty
(
'name'
)
done
()
})
})
})
})
it
(
'correctly validates using custom validation methods'
,
function
(
done
)
{
it
(
'correctly validates using custom validation methods'
,
function
(
done
)
{
...
...
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