Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
e40093d9
Commit
e40093d9
authored
Feb 06, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated tests for Chrome
parent
56c3a105
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
test/jiotests.js
test/jiotests.js
+9
-9
No files found.
test/jiotests.js
View file @
e40093d9
...
@@ -255,7 +255,6 @@ generateTools = function (sinon) {
...
@@ -255,7 +255,6 @@ generateTools = function (sinon) {
return
(
(
A
<
B
)
?
-
1
:
((
A
>
B
)
?
1
:
0
)
)
*
[
-
1
,
1
][
+!!
reverse
];
return
(
(
A
<
B
)
?
-
1
:
((
A
>
B
)
?
1
:
0
)
)
*
[
-
1
,
1
][
+!!
reverse
];
}
}
};
};
return
o
;
return
o
;
},
},
//// end tools
//// end tools
...
@@ -1111,11 +1110,11 @@ test ("AllDocs", function(){
...
@@ -1111,11 +1110,11 @@ test ("AllDocs", function(){
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
fakeDoc
=
{};
o
.
fakeDoc
=
{};
o
.
fakeDoc
.
_id
=
"
doc_
"
+
i
;
o
.
fakeDoc
.
_id
=
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
;
o
.
fakeDoc
.
title
=
o
.
titles
[
i
];
o
.
fakeDoc
.
title
=
o
.
titles
[
i
];
o
.
fakeDoc
.
year
=
o
.
years
[
i
];
o
.
fakeDoc
.
year
=
o
.
years
[
i
];
o
.
fakeDoc
.
author
=
o
.
director
[
i
];
o
.
fakeDoc
.
author
=
o
.
director
[
i
];
localstorage
.
setItem
(
o
.
localpath
+
"
/doc_
"
+
i
,
o
.
fakeDoc
);
localstorage
.
setItem
(
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
,
o
.
fakeDoc
);
}
}
// response
// response
...
@@ -1124,14 +1123,15 @@ test ("AllDocs", function(){
...
@@ -1124,14 +1123,15 @@ test ("AllDocs", function(){
o
.
allDocsResponse
.
total_rows
=
15
;
o
.
allDocsResponse
.
total_rows
=
15
;
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
allDocsResponse
.
rows
.
push
({
o
.
allDocsResponse
.
rows
.
push
({
"
id
"
:
"
doc_
"
+
i
,
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
,
"
key
"
:
"
doc_
"
+
i
,
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
,
"
value
"
:
{}
"
value
"
:
{}
});
});
};
};
// alldocs
// alldocs
o
.
spy
(
o
,
"
value
"
,
o
.
allDocsResponse
,
"
All docs
"
);
o
.
spy
(
o
,
"
value
"
,
o
.
allDocsResponse
,
"
All docs
"
);
o
.
jio
.
allDocs
(
o
.
f
);
o
.
jio
.
allDocs
(
o
.
f
);
o
.
clock
.
tick
(
1000
);
o
.
tick
(
o
);
o
.
tick
(
o
);
// include docs
// include docs
...
@@ -1140,10 +1140,10 @@ test ("AllDocs", function(){
...
@@ -1140,10 +1140,10 @@ test ("AllDocs", function(){
o
.
allDocsResponse
.
total_rows
=
15
;
o
.
allDocsResponse
.
total_rows
=
15
;
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
m
;
i
+=
1
)
{
o
.
allDocsResponse
.
rows
.
push
({
o
.
allDocsResponse
.
rows
.
push
({
"
id
"
:
"
doc_
"
+
i
,
"
id
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
,
"
key
"
:
"
doc_
"
+
i
,
"
key
"
:
"
doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
,
"
value
"
:
{},
"
value
"
:
{},
"
doc
"
:
localstorage
.
getItem
(
o
.
localpath
+
"
/doc_
"
+
i
)
"
doc
"
:
localstorage
.
getItem
(
o
.
localpath
+
"
/doc_
"
+
(
i
<
10
?
"
0
"
+
i
:
i
)
)
});
});
};
};
...
@@ -2536,7 +2536,7 @@ test ("AllDocs", function () {
...
@@ -2536,7 +2536,7 @@ test ("AllDocs", function () {
"
password
"
:
"
checkpwd
"
,
"
password
"
:
"
checkpwd
"
,
"
url
"
:
"
https://ca-davstorage:8080
"
"
url
"
:
"
https://ca-davstorage:8080
"
});
});
console
.
log
(
davlist
);
// get allDocs, no content
// get allDocs, no content
o
.
addFakeServerResponse
(
"
dav
"
,
"
PROPFIND
"
,
""
,
200
,
davlist
);
o
.
addFakeServerResponse
(
"
dav
"
,
"
PROPFIND
"
,
""
,
200
,
davlist
);
o
.
thisShouldBeTheAnswer
=
{
o
.
thisShouldBeTheAnswer
=
{
...
...
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