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 604c87db
authored
Apr 01, 2015
by
Ruben Bridgewater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hooks tests
1 parent
e31a9e5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
test/integration/hooks.test.js
test/integration/include/schema.test.js
test/integration/hooks.test.js
View file @
604c87d
...
@@ -490,7 +490,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -490,7 +490,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
fn
(
new
Error
(
'Whoops! Changed user.mood!'
));
fn
(
new
Error
(
'Whoops! Changed user.mood!'
));
});
});
return
this
.
User
.
create
({
mood
:
'happy'
});
return
this
.
User
.
create
({
mood
:
'happy'
}).
catch
(
function
(
err
)
{
expect
(
err
).
to
.
be
.
instanceOf
(
Error
);
});
});
});
});
});
});
});
...
@@ -1155,10 +1157,10 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -1155,10 +1157,10 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
A
.
hasMany
(
B
);
A
.
hasMany
(
B
);
return
this
.
sequelize
.
sync
({
force
:
true
}).
then
(
function
()
{
return
this
.
sequelize
.
sync
({
force
:
true
}).
then
(
function
()
{
return
[
return
this
.
sequelize
.
Promise
.
all
(
[
A
.
create
({
name
:
'a'
}),
A
.
create
({
name
:
'a'
}),
B
.
create
({
name
:
'b'
})
B
.
create
({
name
:
'b'
})
].
spread
(
function
(
a
,
b
)
{
]
)
.
spread
(
function
(
a
,
b
)
{
return
a
.
addB
(
b
).
then
(
function
()
{
return
a
.
addB
(
b
).
then
(
function
()
{
expect
(
hookCalled
).
to
.
equal
(
1
);
expect
(
hookCalled
).
to
.
equal
(
1
);
});
});
...
...
test/integration/include/schema.test.js
View file @
604c87d
...
@@ -210,8 +210,8 @@ describe(Support.getTestDialectTeaser('Includes with schemas'), function() {
...
@@ -210,8 +210,8 @@ describe(Support.getTestDialectTeaser('Includes with schemas'), function() {
it
(
'should support an include with multiple different association types'
,
function
(
done
)
{
it
(
'should support an include with multiple different association types'
,
function
(
done
)
{
var
self
=
this
;
var
self
=
this
;
self
.
sequelize
.
dropAllSchemas
().
success
(
function
()
{
self
.
sequelize
.
dropAllSchemas
().
then
(
function
()
{
self
.
sequelize
.
createSchema
(
'account'
).
success
(
function
()
{
self
.
sequelize
.
createSchema
(
'account'
).
then
(
function
()
{
var
AccUser
=
self
.
sequelize
.
define
(
'AccUser'
,
{},
{
schema
:
'account'
})
var
AccUser
=
self
.
sequelize
.
define
(
'AccUser'
,
{},
{
schema
:
'account'
})
,
Product
=
self
.
sequelize
.
define
(
'Product'
,
{
,
Product
=
self
.
sequelize
.
define
(
'Product'
,
{
title
:
DataTypes
.
STRING
title
:
DataTypes
.
STRING
...
...
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