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 26e5fe41
authored
Apr 17, 2013
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests to also work for PG
1 parent
d3aebaa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
spec/dao-factory.spec.js
spec/dao-factory.spec.js
View file @
26e5fe4
...
...
@@ -489,26 +489,22 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
it
(
'always honors ZERO as primary key'
,
function
(
_done
)
{
var
permutations
=
[
{
v
:
0
,
k
:
'intV'
}
,
{
v
:
'0'
,
k
:
'intV'
}
,
{
v
:
{
where
:
{
id
:
0
}},
k
:
'intV'
},
{
v
:
{
where
:
{
id
:
'0'
}},
k
:
'strV'
}
0
,
'0'
,
{
where
:
{
id
:
0
}
},
{
where
:
{
id
:
'0'
}
}
]
,
SQLs
=
{
strV
:
"SELECT * FROM `Users` WHERE `Users`.`id`='0' LIMIT 1;"
,
intV
:
"SELECT * FROM `Users` WHERE `Users`.`id`=0 LIMIT 1;"
}
,
done
=
_
.
after
(
2
*
permutations
.
length
,
_done
);
this
.
User
.
create
({
name
:
'jack'
}).
success
(
function
(
jack
)
{
this
.
User
.
create
({
name
:
'jill'
}).
success
(
function
(
jill
)
{
permutations
.
forEach
(
function
(
perm
)
{
this
.
User
.
find
(
perm
.
v
).
done
(
function
(
err
,
user
)
{
this
.
User
.
find
(
perm
).
done
(
function
(
err
,
user
)
{
expect
(
err
).
toBeNull
();
expect
(
user
).
toBeNull
();
done
();
}).
on
(
'sql'
,
function
(
s
)
{
expect
(
s
).
toEqual
(
SQLs
[
perm
.
k
]
);
expect
(
s
.
indexOf
(
0
)).
not
.
toEqual
(
-
1
);
done
();
})
}.
bind
(
this
))
...
...
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