Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
c41d5531
Commit
c41d5531
authored
Mar 19, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allDocs tests added for revisionstorage.js
parent
0bc1b224
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
test/jiotests.js
test/jiotests.js
+109
-0
No files found.
test/jiotests.js
View file @
c41d5531
...
...
@@ -2203,6 +2203,115 @@ test ("Remove", function(){
o
.
jio
.
stop
();
});
test
(
"
allDocs
"
,
function
()
{
var
o
=
generateTools
(
this
);
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
revision
"
,
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
urevad1
"
,
"
application_name
"
:
"
arevad1
"
}
});
o
.
localpath
=
"
jio/localstorage/urevad1/arevad1
"
;
// adding 3 documents
o
.
jio
.
put
({
"
_id
"
:
"
yes
"
},
function
(
err
,
response
)
{
o
.
rev1
=
(
response
||
{}).
rev
;
});
o
.
jio
.
put
({
"
_id
"
:
"
no
"
},
function
(
err
,
response
)
{
o
.
rev2
=
(
response
||
{}).
rev
;
});
o
.
jio
.
put
({
"
_id
"
:
"
maybe
"
},
function
(
err
,
response
)
{
o
.
rev3
=
(
response
||
{}).
rev
;
});
o
.
clock
.
tick
(
1000
);
// adding conflicts
o
.
jio
.
put
({
"
_id
"
:
"
maybe
"
});
// adding 2 attachments
o
.
jio
.
putAttachment
({
"
_id
"
:
"
yes
"
,
"
_attachment
"
:
"
blue
"
,
"
_mimetype
"
:
"
text/plain
"
,
"
_rev
"
:
o
.
rev1
,
"
_data
"
:
"
sky
"
},
function
(
err
,
response
)
{
o
.
rev1
=
(
response
||
{}).
rev
;
});
o
.
jio
.
putAttachment
({
"
_id
"
:
"
no
"
,
"
_attachment
"
:
"
Heeeee!
"
,
"
_mimetype
"
:
"
text/plain
"
,
"
_rev
"
:
o
.
rev2
,
"
_data
"
:
"
Hooooo!
"
},
function
(
err
,
response
)
{
o
.
rev2
=
(
response
||
{}).
rev
;
});
o
.
clock
.
tick
(
1000
);
o
.
rows
=
{
"
total_rows
"
:
3
,
"
rows
"
:
[{
"
id
"
:
"
no
"
,
"
key
"
:
"
no
"
,
"
value
"
:
{
"
rev
"
:
o
.
rev2
}
},
{
"
id
"
:
"
maybe
"
,
"
key
"
:
"
maybe
"
,
"
value
"
:
{
"
rev
"
:
o
.
rev3
}
},
{
"
id
"
:
"
yes
"
,
"
key
"
:
"
yes
"
,
"
value
"
:
{
"
rev
"
:
o
.
rev1
}
}]
};
o
.
spy
(
o
,
"
value
"
,
o
.
rows
,
"
allDocs
"
);
o
.
jio
.
allDocs
(
o
.
f
);
o
.
tick
(
o
);
o
.
rows
.
rows
[
0
].
doc
=
{
"
_id
"
:
"
no
"
,
"
_rev
"
:
o
.
rev2
,
"
_attachments
"
:
{
"
Heeeee!
"
:
{
"
content_type
"
:
"
text/plain
"
,
"
digest
"
:
"
md5-2686969b0bc0fd9bc186146a1ecb09a7
"
,
"
length
"
:
7
}
},
};
o
.
rows
.
rows
[
1
].
doc
=
{
"
_id
"
:
"
maybe
"
,
"
_rev
"
:
o
.
rev3
};
o
.
rows
.
rows
[
2
].
doc
=
{
"
_id
"
:
"
yes
"
,
"
_rev
"
:
o
.
rev1
,
"
_attachments
"
:
{
"
blue
"
:
{
"
content_type
"
:
"
text/plain
"
,
"
digest
"
:
"
md5-900bc885d7553375aec470198a9514f3
"
,
"
length
"
:
3
}
},
};
o
.
rows
.
rows
.
unshift
(
o
.
rows
.
rows
.
pop
());
o
.
spy
(
o
,
"
value
"
,
o
.
rows
,
"
allDocs + include docs
"
);
o
.
jio
.
allDocs
({
"
include_docs
"
:
true
},
o
.
f
);
o
.
tick
(
o
);
o
.
jio
.
stop
();
});
test
(
"
Scenario
"
,
function
(){
var
o
=
generateTools
(
this
);
...
...
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