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 d6a3ffdf
authored
Mar 28, 2012
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first running test with busterjs
1 parent
f636cd85
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
spec/sqlite/dao.spec.js
spec/sqlite/dao.spec.js
View file @
d6a3ffd
...
@@ -2,7 +2,6 @@ if(typeof require === 'function') {
...
@@ -2,7 +2,6 @@ if(typeof require === 'function') {
const
buster
=
require
(
"buster"
)
const
buster
=
require
(
"buster"
)
,
Sequelize
=
require
(
"../../index"
)
,
Sequelize
=
require
(
"../../index"
)
,
config
=
require
(
"../config"
)
,
config
=
require
(
"../config"
)
console
.
log
(
Sequelize
)
}
}
buster
.
spec
.
expose
()
buster
.
spec
.
expose
()
...
@@ -12,7 +11,7 @@ describe('SQLite', function() {
...
@@ -12,7 +11,7 @@ describe('SQLite', function() {
var
self
=
this
var
self
=
this
this
.
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
{
this
.
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
{
logging
:
fals
e
,
logging
:
tru
e
,
dialect
:
'sqlite'
dialect
:
'sqlite'
})
})
...
@@ -31,8 +30,26 @@ describe('SQLite', function() {
...
@@ -31,8 +30,26 @@ describe('SQLite', function() {
describe
(
'DAO'
,
function
()
{
describe
(
'DAO'
,
function
()
{
describe
(
'findAll'
,
function
()
{
describe
(
'findAll'
,
function
()
{
it
(
"handles dates correctly"
,
function
()
{
it
(
"handles dates correctly"
,
function
(
done
)
{
var
self
=
this
this
.
User
.
create
({
username
:
'user'
,
createdAt
:
new
Date
(
2011
,
04
,
04
)
})
.
success
(
function
(
oldUser
)
{
self
.
User
.
create
({
username
:
'new user'
})
.
success
(
function
(
newUser
)
{
console
.
log
(
oldUser
.
values
)
console
.
log
(
newUser
.
values
)
self
.
User
.
findAll
({
where
:
[
'createdAt > ?'
,
new
Date
(
2012
,
01
,
01
)]
}).
success
(
function
(
users
)
{
expect
(
users
.
length
).
toEqual
(
1
)
done
()
})
})
})
})
})
})
})
})
})
...
...
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