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 18da2d19
authored
May 16, 2016
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(test): Update unit test to match new .validate signature
1 parent
d5607665
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
test/unit/instance/build.test.js
test/unit/model/validation.test.js
test/unit/instance/build.test.js
View file @
18da2d1
...
@@ -48,9 +48,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
...
@@ -48,9 +48,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
expect
(
instance
.
get
(
'updated_time'
)).
to
.
be
.
ok
;
expect
(
instance
.
get
(
'updated_time'
)).
to
.
be
.
ok
;
expect
(
instance
.
get
(
'updated_time'
)).
to
.
be
.
an
.
instanceof
(
Date
);
expect
(
instance
.
get
(
'updated_time'
)).
to
.
be
.
an
.
instanceof
(
Date
);
return
instance
.
validate
().
then
(
function
(
err
)
{
return
instance
.
validate
();
expect
(
err
).
to
.
be
.
equal
(
null
);
});
});
});
it
(
'should popuplate explicitely undefined UUID primary keys'
,
function
()
{
it
(
'should popuplate explicitely undefined UUID primary keys'
,
function
()
{
...
...
test/unit/model/validation.test.js
View file @
18da2d1
...
@@ -199,9 +199,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() {
...
@@ -199,9 +199,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() {
var
failingUser
=
UserFail
.
build
({
name
:
failingValue
});
var
failingUser
=
UserFail
.
build
({
name
:
failingValue
});
return
failingUser
.
validate
().
then
(
function
(
_errors
)
{
return
expect
(
failingUser
.
validate
()).
to
.
be
.
rejected
.
then
(
function
(
_errors
)
{
expect
(
_errors
).
not
.
to
.
be
.
null
;
expect
(
_errors
).
to
.
be
.
an
.
instanceOf
(
Error
);
expect
(
_errors
.
get
(
'name'
)[
0
].
message
).
to
.
equal
(
message
);
expect
(
_errors
.
get
(
'name'
)[
0
].
message
).
to
.
equal
(
message
);
});
});
});
});
...
@@ -230,11 +228,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() {
...
@@ -230,11 +228,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() {
}
}
});
});
var
successfulUser
=
UserSuccess
.
build
({
name
:
succeedingValue
});
var
successfulUser
=
UserSuccess
.
build
({
name
:
succeedingValue
});
return
successfulUser
.
validate
().
then
(
function
(
errors
)
{
return
expect
(
successfulUser
.
validate
()).
not
.
to
.
be
.
rejected
;
expect
(
errors
).
to
.
be
.
null
;
}).
catch
(
function
(
err
)
{
expect
(
err
).
to
.
deep
.
equal
({});
});
});
});
};
};
...
...
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