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 e5bdda78
authored
Apr 26, 2011
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed spec
1 parent
af9a5a72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
test/Model/create.js
test/Model/create.js
View file @
e5bdda7
...
@@ -29,9 +29,11 @@ module.exports = {
...
@@ -29,9 +29,11 @@ module.exports = {
User
.
sync
({
force
:
true
}).
on
(
'success'
,
function
()
{
User
.
sync
({
force
:
true
}).
on
(
'success'
,
function
()
{
User
.
create
({
username
:
'foo'
,
smth
:
null
}).
on
(
'failure'
,
function
(
err
)
{
User
.
create
({
username
:
'foo'
,
smth
:
null
}).
on
(
'failure'
,
function
(
err
)
{
assert
.
eql
(
err
.
message
,
"Column 'smth' cannot be null"
)
assert
.
eql
(
err
.
message
,
"Column 'smth' cannot be null"
)
User
.
create
({
username
:
'foo'
}).
on
(
'failure'
,
function
(
err
)
{
User
.
create
({
username
:
'foo'
,
smth
:
'foo'
}).
on
(
'success'
,
function
()
{
assert
.
eql
(
err
.
message
,
"Colusmn 'smth' cannot be null"
)
User
.
create
({
username
:
'foo'
,
smth
:
'bar'
}).
on
(
'failure'
,
function
(
err
)
{
exit
(
function
(){})
assert
.
eql
(
err
.
message
,
"Duplicate entry 'foo' for key 'username'"
)
exit
(
function
(){})
})
})
})
})
})
})
})
...
...
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