Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
jio-main
Commits
d0802be2
Commit
d0802be2
authored
Aug 26, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
job tests upgraded to tests job workspace
parent
aa5984f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
test/jio/tests.js
test/jio/tests.js
+15
-7
No files found.
test/jio/tests.js
View file @
d0802be2
...
@@ -865,15 +865,16 @@
...
@@ -865,15 +865,16 @@
});
});
test
(
'
Job Update
'
,
function
()
{
test
(
'
Job Update
'
,
function
()
{
expect
(
4
);
expect
(
5
);
var
clock
,
jio
,
o
=
{};
var
clock
,
jio
,
o
=
{};
clock
=
sinon
.
useFakeTimers
();
clock
=
sinon
.
useFakeTimers
();
o
.
workspace
=
{};
jio
=
new
JIO
({
jio
=
new
JIO
({
"
type
"
:
"
fake
"
,
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Update
"
"
id
"
:
"
Job Update
"
},
{
},
{
"
workspace
"
:
{}
"
workspace
"
:
o
.
workspace
});
});
jio
.
put
({
"
_id
"
:
"
a
"
}).
always
(
function
(
answer
)
{
jio
.
put
({
"
_id
"
:
"
a
"
}).
always
(
function
(
answer
)
{
...
@@ -905,18 +906,21 @@
...
@@ -905,18 +906,21 @@
o
.
first_put_command
.
success
();
o
.
first_put_command
.
success
();
clock
.
tick
(
1
);
clock
.
tick
(
1
);
deepEqual
(
o
.
workspace
,
{},
'
No job in the queue
'
);
});
});
test
(
'
Job Wait
'
,
function
()
{
test
(
'
Job Wait
'
,
function
()
{
expect
(
5
);
expect
(
6
);
var
clock
,
jio
,
o
=
{};
var
clock
,
jio
,
o
=
{};
clock
=
sinon
.
useFakeTimers
();
clock
=
sinon
.
useFakeTimers
();
o
.
workspace
=
{};
jio
=
new
JIO
({
jio
=
new
JIO
({
"
type
"
:
"
fake
"
,
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Wait
"
"
id
"
:
"
Job Wait
"
},
{
},
{
"
workspace
"
:
{}
"
workspace
"
:
o
.
workspace
});
});
jio
.
put
({
"
_id
"
:
"
a
"
}).
always
(
function
(
answer
)
{
jio
.
put
({
"
_id
"
:
"
a
"
}).
always
(
function
(
answer
)
{
...
@@ -951,11 +955,13 @@
...
@@ -951,11 +955,13 @@
fakestorage
[
'
Job Wait/put
'
].
success
();
fakestorage
[
'
Job Wait/put
'
].
success
();
clock
.
tick
(
1
);
clock
.
tick
(
1
);
deepEqual
(
o
.
workspace
,
{},
'
No job in the queue
'
);
});
});
test
(
'
Job Deny + Job condition addition
'
,
function
()
{
test
(
'
Job Deny + Job condition addition
'
,
function
()
{
expect
(
1
);
expect
(
2
);
var
clock
,
jio
;
var
clock
,
jio
,
workspace
=
{}
;
clock
=
sinon
.
useFakeTimers
();
clock
=
sinon
.
useFakeTimers
();
jIO
.
addJobRuleCondition
(
'
isGetMethod
'
,
function
(
job
)
{
jIO
.
addJobRuleCondition
(
'
isGetMethod
'
,
function
(
job
)
{
...
@@ -966,7 +972,7 @@
...
@@ -966,7 +972,7 @@
"
type
"
:
"
fake
"
,
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Wait
"
"
id
"
:
"
Job Wait
"
},
{
},
{
"
workspace
"
:
{}
,
"
workspace
"
:
workspace
,
"
job_rules
"
:
[{
"
job_rules
"
:
[{
"
code_name
"
:
"
get rejecter
"
,
"
code_name
"
:
"
get rejecter
"
,
"
single
"
:
true
,
"
single
"
:
true
,
...
@@ -987,6 +993,8 @@
...
@@ -987,6 +993,8 @@
clock
.
tick
(
1
);
clock
.
tick
(
1
);
deepEqual
(
workspace
,
{},
'
No job in the queue
'
);
});
});
}));
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment