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 6087e907
authored
Apr 02, 2015
by
Ruben Bridgewater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use then instead of done
1 parent
5207a136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
test/integration/model/findAll.test.js
test/integration/model/findAll.test.js
View file @
6087e90
...
...
@@ -761,7 +761,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
it
(
'should return a DAO when queryOptions are not set'
,
function
()
{
var
self
=
this
;
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}}).
done
(
function
(
err
,
users
)
{
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}}).
then
(
function
(
users
)
{
users
.
forEach
(
function
(
user
)
{
expect
(
user
).
to
.
be
.
instanceOf
(
self
.
User
.
DAO
);
});
...
...
@@ -770,7 +770,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
it
(
'should return a DAO when raw is false'
,
function
()
{
var
self
=
this
;
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}},
{
raw
:
false
}).
done
(
function
(
err
,
users
)
{
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}},
{
raw
:
false
}).
then
(
function
(
users
)
{
users
.
forEach
(
function
(
user
)
{
expect
(
user
).
to
.
be
.
instanceOf
(
self
.
User
.
DAO
);
});
...
...
@@ -779,7 +779,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
it
(
'should return raw data when raw is true'
,
function
()
{
var
self
=
this
;
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}},
{
raw
:
true
}).
done
(
function
(
err
,
users
)
{
return
this
.
User
.
findAll
({
where
:
{
username
:
'barfooz'
}},
{
raw
:
true
}).
then
(
function
(
users
)
{
users
.
forEach
(
function
(
user
)
{
expect
(
user
).
to
.
not
.
be
.
instanceOf
(
self
.
User
.
DAO
);
expect
(
users
[
0
]).
to
.
be
.
instanceOf
(
Object
);
...
...
@@ -880,7 +880,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
});
it
(
'includes all nested associations'
,
function
()
{
return
this
.
Continent
.
findAll
({
include
:
[{
all
:
true
,
nested
:
true
}]
}).
done
(
function
(
err
,
continents
)
{
return
this
.
Continent
.
findAll
({
include
:
[{
all
:
true
,
nested
:
true
}]
}).
then
(
function
(
continents
)
{
expect
(
continents
).
to
.
exist
;
expect
(
continents
[
0
]).
to
.
exist
;
expect
(
continents
[
0
].
countries
).
to
.
exist
;
...
...
@@ -1241,7 +1241,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
name
:
Sequelize
.
STRING
});
return
Company
.
sync
().
done
(
function
()
{
return
Company
.
sync
().
then
(
function
()
{
return
Company
.
findAll
({
order
:
[
self
.
sequelize
.
col
(
'name'
)]
});
...
...
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