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 7894ba10
authored
Apr 25, 2014
by
Siyang Bi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Update table prefix test
1 parent
c0d30a27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
test/dao-factory.test.js
test/dao-factory.test.js
View file @
7894ba1
...
...
@@ -1015,20 +1015,31 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
,
data
=
[{
username
:
'Peter'
,
secretValue
:
'42'
},
{
username
:
'Paul'
,
secretValue
:
'42'
},
{
username
:
'Bob'
,
secretValue
:
'43'
}]
,
prefixUser
=
self
.
User
.
schema
(
'prefix'
,
'_'
)
prefixUser
.
sync
({
force
:
true
}).
success
(
function
()
{
prefixUser
.
bulkCreate
(
data
).
success
(
function
()
{
prefixUser
.
destroy
({
secretValue
:
'42'
})
.
success
(
function
()
{
prefixUser
.
findAll
({
order
:
'id'
}).
success
(
function
(
users
)
{
expect
(
users
.
length
).
to
.
equal
(
1
)
expect
(
users
[
0
].
username
).
to
.
equal
(
"Bob"
)
done
()
,
prefixUser
=
self
.
User
.
schema
(
'prefix'
)
var
run
=
function
()
{
prefixUser
.
sync
({
force
:
true
}).
success
(
function
()
{
prefixUser
.
bulkCreate
(
data
).
success
(
function
()
{
prefixUser
.
destroy
({
secretValue
:
'42'
})
.
success
(
function
()
{
prefixUser
.
findAll
({
order
:
'id'
}).
success
(
function
(
users
)
{
expect
(
users
.
length
).
to
.
equal
(
1
)
expect
(
users
[
0
].
username
).
to
.
equal
(
"Bob"
)
done
()
})
})
})
})
})
})
}
if
(
dialect
===
"postgres"
)
{
this
.
sequelize
.
queryInterface
.
createSchema
(
'prefix'
).
success
(
function
()
{
run
.
call
(
self
)
})
}
else
{
run
.
call
(
self
)
}
})
})
...
...
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