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 118460f9
authored
Dec 21, 2011
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check all specs for every single dialect
1 parent
bbd796f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
spec/model.spec.js
spec/model.spec.js
View file @
118460f
var
config
=
require
(
"./config/config"
)
var
config
=
require
(
"./config/config"
)
,
Sequelize
=
require
(
"../index"
)
,
Sequelize
=
require
(
"../index"
)
,
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
{
logging
:
false
})
,
dialects
=
[
'sqlite'
,
'mysql'
]
,
Helpers
=
new
(
require
(
"./config/helpers"
))(
sequelize
)
describe
(
'Model'
,
function
()
{
describe
(
'Model'
,
function
()
{
dialects
.
forEach
(
function
(
dialect
)
{
describe
(
'with dialect "'
+
dialect
+
'"'
,
function
()
{
var
User
=
null
var
User
=
null
,
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
{
logging
:
false
,
dialect
:
dialect
})
,
Helpers
=
new
(
require
(
"./config/helpers"
))(
sequelize
)
var
setup
=
function
()
{
var
setup
=
function
()
{
Helpers
.
async
(
function
(
done
)
{
Helpers
.
async
(
function
(
done
)
{
...
@@ -288,6 +294,7 @@ describe('Model', function() {
...
@@ -288,6 +294,7 @@ describe('Model', function() {
it
(
"returns false for objects found by find method"
,
function
()
{
it
(
"returns false for objects found by find method"
,
function
()
{
Helpers
.
async
(
function
(
done
)
{
Helpers
.
async
(
function
(
done
)
{
User
.
create
({
username
:
'user'
}).
success
(
function
(
user
)
{
User
.
create
({
username
:
'user'
}).
success
(
function
(
user
)
{
User
.
create
({
username
:
'user'
}).
success
(
function
(
user
)
{
User
.
find
(
user
.
id
).
success
(
function
(
user
)
{
User
.
find
(
user
.
id
).
success
(
function
(
user
)
{
expect
(
user
.
isNewRecord
).
toBeFalsy
()
expect
(
user
.
isNewRecord
).
toBeFalsy
()
done
()
done
()
...
@@ -295,6 +302,7 @@ describe('Model', function() {
...
@@ -295,6 +302,7 @@ describe('Model', function() {
})
})
})
})
})
})
})
it
(
"returns false for objects found by findAll method"
,
function
()
{
it
(
"returns false for objects found by findAll method"
,
function
()
{
var
chainer
=
new
Sequelize
.
Utils
.
QueryChainer
var
chainer
=
new
Sequelize
.
Utils
.
QueryChainer
...
@@ -464,4 +472,6 @@ describe('Model', function() {
...
@@ -464,4 +472,6 @@ describe('Model', function() {
})
})
})
})
})
})
})
})
})
})
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