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 c428e40a
authored
Feb 09, 2015
by
Willyham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and simplify tests
1 parent
06aa7aae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
test/integration/dialects/abstract/connection-manager.test.js
test/integration/sequelize.transaction.test.js
test/integration/dialects/abstract/connection-manager.test.js
View file @
c428e40
...
@@ -35,7 +35,7 @@ describe('Connction Manager', function() {
...
@@ -35,7 +35,7 @@ describe('Connction Manager', function() {
var
options
=
{
var
options
=
{
replication
:
null
replication
:
null
};
};
var
sequelize
=
Support
.
getSequelizeInstance
(
baseConf
.
database
,
baseConf
.
username
,
baseConf
.
password
,
options
);
var
sequelize
=
Support
.
createSequelizeInstance
(
options
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
poolSpy
=
sandbox
.
spy
(
Pooling
,
"Pool"
);
var
poolSpy
=
sandbox
.
spy
(
Pooling
,
"Pool"
);
...
@@ -50,7 +50,7 @@ describe('Connction Manager', function() {
...
@@ -50,7 +50,7 @@ describe('Connction Manager', function() {
read
:
[
_
.
clone
(
poolEntry
),
_
.
clone
(
poolEntry
)]
read
:
[
_
.
clone
(
poolEntry
),
_
.
clone
(
poolEntry
)]
}
}
};
};
var
sequelize
=
Support
.
getSequelizeInstance
(
baseConf
.
database
,
baseConf
.
username
,
baseConf
.
password
,
options
);
var
sequelize
=
Support
.
createSequelizeInstance
(
options
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
poolSpy
=
sandbox
.
spy
(
Pooling
,
"Pool"
);
var
poolSpy
=
sandbox
.
spy
(
Pooling
,
"Pool"
);
...
@@ -70,7 +70,7 @@ describe('Connction Manager', function() {
...
@@ -70,7 +70,7 @@ describe('Connction Manager', function() {
read
:
[
slave1
,
slave2
]
read
:
[
slave1
,
slave2
]
}
}
};
};
var
sequelize
=
Support
.
getSequelizeInstance
(
baseConf
.
database
,
baseConf
.
username
,
baseConf
.
password
,
options
);
var
sequelize
=
Support
.
createSequelizeInstance
(
options
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
resolvedPromise
=
new
Promise
(
function
(
resolve
)
{
var
resolvedPromise
=
new
Promise
(
function
(
resolve
)
{
...
@@ -112,7 +112,7 @@ describe('Connction Manager', function() {
...
@@ -112,7 +112,7 @@ describe('Connction Manager', function() {
read
:
[
_
.
clone
(
poolEntry
)]
read
:
[
_
.
clone
(
poolEntry
)]
}
}
};
};
var
sequelize
=
Support
.
getSequelizeInstance
(
baseConf
.
database
,
baseConf
.
username
,
baseConf
.
password
,
options
);
var
sequelize
=
Support
.
createSequelizeInstance
(
options
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
connectionManager
=
new
ConnectionManager
(
Support
.
getTestDialect
(),
sequelize
);
var
resolvedPromise
=
new
Promise
(
function
(
resolve
)
{
var
resolvedPromise
=
new
Promise
(
function
(
resolve
)
{
...
...
test/integration/sequelize.transaction.test.js
View file @
c428e40
...
@@ -77,10 +77,9 @@ describe(Support.getTestDialectTeaser('Sequelize#transaction'), function() {
...
@@ -77,10 +77,9 @@ describe(Support.getTestDialectTeaser('Sequelize#transaction'), function() {
// how could we enforce an authentication error in sqlite?
// how could we enforce an authentication error in sqlite?
}
else
{
}
else
{
it
(
'gets triggered once an error occurs'
,
function
(
done
)
{
it
(
'gets triggered once an error occurs'
,
function
(
done
)
{
var
sequelize
=
Support
.
createSequelizeInstance
();
//
lets overwrite the host to get
an error
//
Supply bad config to force
an error
sequelize
.
config
.
username
=
'foobarbaz'
;
var
sequelize
=
Support
.
getSequelizeInstance
(
'this'
,
'is'
,
'fake config'
)
;
sequelize
sequelize
.
transaction
().
then
(
function
()
{})
.
transaction
().
then
(
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