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 c25e8f46
authored
Feb 15, 2013
by
Chia-liang Kao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mark all known dialect-specific failing tests as todo with itEventually
1 parent
99a6d3c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
spec/associations/belongs-to.spec.js
spec/dao-factory.spec.js
spec/migrator.spec.js
spec/associations/belongs-to.spec.js
View file @
c25e8f4
...
@@ -11,6 +11,7 @@ buster.testRunner.timeout = 500
...
@@ -11,6 +11,7 @@ buster.testRunner.timeout = 500
describe
(
Helpers
.
getTestDialectTeaser
(
"BelongsTo"
),
function
()
{
describe
(
Helpers
.
getTestDialectTeaser
(
"BelongsTo"
),
function
()
{
before
(
function
(
done
)
{
before
(
function
(
done
)
{
Helpers
.
initTests
({
Helpers
.
initTests
({
dialect
:
dialect
,
beforeComplete
:
function
(
sequelize
)
{
beforeComplete
:
function
(
sequelize
)
{
this
.
sequelize
=
sequelize
this
.
sequelize
=
sequelize
}.
bind
(
this
),
}.
bind
(
this
),
...
...
spec/dao-factory.spec.js
View file @
c25e8f4
...
@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
...
@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
})
})
})
})
it
(
'stores the current date in createdAt'
,
function
(
done
)
{
;(
dialect
.
match
(
/^postgres/
)
?
itEventually
:
it
)
(
'stores the current date in createdAt'
,
function
(
done
)
{
this
.
User
.
create
({
username
:
'foo'
}).
success
(
function
(
user
)
{
this
.
User
.
create
({
username
:
'foo'
}).
success
(
function
(
user
)
{
expect
(
parseInt
(
+
user
.
createdAt
/
5000
)).
toEqual
(
parseInt
(
+
new
Date
()
/
5000
))
expect
(
parseInt
(
+
user
.
createdAt
/
5000
)).
toEqual
(
parseInt
(
+
new
Date
()
/
5000
))
done
()
done
()
...
...
spec/migrator.spec.js
View file @
c25e8f4
...
@@ -121,7 +121,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
...
@@ -121,7 +121,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
})
})
})
})
it
(
"executes migration #20111117063700 and correctly adds isBetaMember"
,
function
(
done
)
{
;(
dialect
===
'sqlite'
?
itEventually
:
it
)
(
"executes migration #20111117063700 and correctly adds isBetaMember"
,
function
(
done
)
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'Person'
).
success
(
function
(
data
)
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'Person'
).
success
(
function
(
data
)
{
var
fields
=
data
.
map
(
function
(
d
)
{
return
d
.
Field
}).
sort
()
var
fields
=
data
.
map
(
function
(
d
)
{
return
d
.
Field
}).
sort
()
expect
(
fields
).
toEqual
([
'isBetaMember'
,
'name'
])
expect
(
fields
).
toEqual
([
'isBetaMember'
,
'name'
])
...
@@ -167,7 +167,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
...
@@ -167,7 +167,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
}.
bind
(
this
))
}.
bind
(
this
))
})
})
it
(
"executes migration #20111205064000 and renames a table"
,
function
(
done
)
{
;(
dialect
===
'sqlite'
?
itEventually
:
it
)
(
"executes migration #20111205064000 and renames a table"
,
function
(
done
)
{
this
.
sequelize
.
getQueryInterface
().
showAllTables
().
success
(
function
(
tableNames
)
{
this
.
sequelize
.
getQueryInterface
().
showAllTables
().
success
(
function
(
tableNames
)
{
tableNames
=
tableNames
.
filter
(
function
(
e
){
return
e
!=
'SequelizeMeta'
})
tableNames
=
tableNames
.
filter
(
function
(
e
){
return
e
!=
'SequelizeMeta'
})
expect
(
tableNames
).
toEqual
([
'Person'
])
expect
(
tableNames
).
toEqual
([
'Person'
])
...
@@ -213,7 +213,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
...
@@ -213,7 +213,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
})
})
describe
(
'removeColumn'
,
function
()
{
describe
(
'removeColumn'
,
function
()
{
it
(
'removes the shopId column from user'
,
function
(
done
)
{
(
dialect
===
'mysql'
?
it
:
itEventually
)
(
'removes the shopId column from user'
,
function
(
done
)
{
this
.
init
({
to
:
20111206061400
},
function
(
migrator
)
{
this
.
init
({
to
:
20111206061400
},
function
(
migrator
)
{
migrator
.
migrate
().
success
(
function
(){
migrator
.
migrate
().
success
(
function
(){
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
...
@@ -238,7 +238,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
...
@@ -238,7 +238,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
})
})
describe
(
'changeColumn'
,
function
()
{
describe
(
'changeColumn'
,
function
()
{
it
(
'changes the signature column from user to default "signature" + notNull'
,
function
(
done
)
{
(
dialect
===
'mysql'
?
it
:
itEventually
)
(
'changes the signature column from user to default "signature" + notNull'
,
function
(
done
)
{
this
.
init
({
to
:
20111206063000
},
function
(
migrator
)
{
this
.
init
({
to
:
20111206063000
},
function
(
migrator
)
{
migrator
.
migrate
().
success
(
function
()
{
migrator
.
migrate
().
success
(
function
()
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
...
@@ -258,7 +258,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
...
@@ -258,7 +258,7 @@ describe(Helpers.getTestDialectTeaser("Migrator"), function() {
})
})
describe
(
'renameColumn'
,
function
()
{
describe
(
'renameColumn'
,
function
()
{
it
(
"renames the signature column from user to sig"
,
function
(
done
)
{
(
dialect
===
'mysql'
?
it
:
itEventually
)
(
"renames the signature column from user to sig"
,
function
(
done
)
{
this
.
init
({
to
:
20111206163300
},
function
(
migrator
)
{
this
.
init
({
to
:
20111206163300
},
function
(
migrator
)
{
migrator
.
migrate
().
success
(
function
(){
migrator
.
migrate
().
success
(
function
(){
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
this
.
sequelize
.
getQueryInterface
().
describeTable
(
'User'
).
success
(
function
(
data
)
{
...
...
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