Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
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
Xiaohe Cao
jio
Commits
55904db0
Commit
55904db0
authored
Jan 07, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove qunit tests
parent
a395c77d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
test/jiotests.js
test/jiotests.js
+18
-14
No files found.
test/jiotests.js
View file @
55904db0
...
@@ -1395,7 +1395,8 @@ test ("Remove", function(){
...
@@ -1395,7 +1395,8 @@ test ("Remove", function(){
localstorage
.
setItem
(
o
.
localpath
+
"
/remove1.revision_tree.json
"
,
o
.
doctree
);
localstorage
.
setItem
(
o
.
localpath
+
"
/remove1.revision_tree.json
"
,
o
.
doctree
);
// 1. remove non existing attachment with revision
// 1. remove non existing attachment with revision
o
.
spy
(
o
,
"
status
"
,
404
,
"
Remove non existing attachment (with revision)
"
);
o
.
spy
(
o
,
"
status
"
,
404
,
"
Remove NON-existing attachment (revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1.1-rev2/remove0
"
,
"
_rev
"
:
o
.
old_rev
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1.1-rev2/remove0
"
,
"
_rev
"
:
o
.
old_rev
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -1422,7 +1423,7 @@ test ("Remove", function(){
...
@@ -1422,7 +1423,7 @@ test ("Remove", function(){
// 2. remove existing attachment with revision
// 2. remove existing attachment with revision
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
,
"
rev
"
:
o
.
rev
},
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
,
"
rev
"
:
o
.
rev
},
"
Remove
attachment (with
revision)
"
);
"
Remove
existing attachment (
revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove2
"
,
"
_rev
"
:
o
.
old_rev
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove2
"
,
"
_rev
"
:
o
.
old_rev
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -1458,7 +1459,8 @@ test ("Remove", function(){
...
@@ -1458,7 +1459,8 @@ test ("Remove", function(){
localstorage
.
setItem
(
o
.
localpath
+
"
/remove1.revision_tree.json
"
,
o
.
doctree
);
localstorage
.
setItem
(
o
.
localpath
+
"
/remove1.revision_tree.json
"
,
o
.
doctree
);
// 3. remove non existing attachment without revision
// 3. remove non existing attachment without revision
o
.
spy
(
o
,
"
status
"
,
404
,
"
Remove non existing attachment (without revision)
"
)
o
.
spy
(
o
,
"
status
"
,
409
,
"
409 - Removing non-existing-attachment (no revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove0
"
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove0
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -1471,32 +1473,34 @@ test ("Remove", function(){
...
@@ -1471,32 +1473,34 @@ test ("Remove", function(){
o
.
second_rev
=
"
3-
"
+
hex_sha256
(
JSON
.
stringify
(
o
.
doc_myremove3
)
+
JSON
.
stringify
(
o
.
revs_info
));
o
.
second_rev
=
"
3-
"
+
hex_sha256
(
JSON
.
stringify
(
o
.
doc_myremove3
)
+
JSON
.
stringify
(
o
.
revs_info
));
// 4. remove existing attachment without revision
// 4. remove existing attachment without revision
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
,
"
rev
"
:
o
.
second_rev
},
o
.
spy
(
o
,
"
status
"
,
409
,
"
409 - Removing existing attachment (no revision)
"
);
"
Remove attachment (without revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove3
"
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1/remove3
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
// 5. remove wrong revision
// 5. remove wrong revision
o
.
spy
(
o
,
"
status
"
,
409
,
"
Removing wrong revision (not latest
)
"
);
o
.
spy
(
o
,
"
status
"
,
409
,
"
409 - Removing document (false revision
)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
second_old_rev
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
second_old_rev
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
o
.
revs_info
=
[
o
.
revs_info
=
[
{
"
rev
"
:
o
.
second_rev
,
"
status
"
:
"
available
"
},
{
"
rev
"
:
o
.
rev
,
"
status
"
:
"
available
"
},
{
"
rev
"
:
o
.
second_old_rev
,
"
status
"
:
"
available
"
},
{
"
rev
"
:
o
.
old_rev
,
"
status
"
:
"
available
"
},
{
"
rev
"
:
"
1-rev2
"
,
"
status
"
:
"
available
"
}
{
"
rev
"
:
o
.
very_old_rev
,
"
status
"
:
"
available
"
}
];
];
o
.
doc_myremove4
=
{
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
second_rev
};
o
.
second_new_rev
=
"
4-
"
+
hex_sha256
(
JSON
.
stringify
(
o
.
doc_myremove4
)
+
JSON
.
stringify
(
o
.
revs_info
));
o
.
doc_myremove4
=
{
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
rev
};
o
.
second_new_rev
=
"
4-
"
+
hex_sha256
(
JSON
.
stringify
(
o
.
doc_myremove4
)
+
JSON
.
stringify
(
o
.
revs_info
));
// 6. remove revision
// 6. remove revision
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
,
"
rev
"
:
o
.
second_new_rev
},
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
id
"
:
"
remove1
"
,
"
rev
"
:
o
.
second_new_rev
},
"
Remove
attach
ment (with revision)
"
);
"
Remove
docu
ment (with revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
second_
rev
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
,
"
_rev
"
:
o
.
rev
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
// 7. remove document without revision
// 7. remove document without revision
o
.
spy
(
o
,
"
status
"
,
409
,
"
Removing document without revision and multiple existing versions
"
);
o
.
spy
(
o
,
"
status
"
,
409
,
"
409 - Removing document (no revision)
"
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
},
o
.
f
);
o
.
jio
.
remove
({
"
_id
"
:
"
remove1
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
...
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