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
21fc131a
Commit
21fc131a
authored
Dec 12, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revisionstorage get{,Attachment} unit tests done
parent
3ad7eaba
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
276 additions
and
182 deletions
+276
-182
src/jio.storage/revisionstorage.js
src/jio.storage/revisionstorage.js
+4
-4
test/jio.storage/revisionstorage.tests.js
test/jio.storage/revisionstorage.tests.js
+272
-178
No files found.
src/jio.storage/revisionstorage.js
View file @
21fc131a
...
@@ -503,7 +503,7 @@
...
@@ -503,7 +503,7 @@
priv
.
notFoundError
=
function
(
message
,
reason
)
{
priv
.
notFoundError
=
function
(
message
,
reason
)
{
return
{
return
{
"
status
"
:
"
not_found
"
,
"
status
"
:
404
,
"
message
"
:
message
,
"
message
"
:
message
,
"
reason
"
:
reason
"
reason
"
:
reason
};
};
...
@@ -511,7 +511,7 @@
...
@@ -511,7 +511,7 @@
priv
.
conflictError
=
function
(
message
,
reason
)
{
priv
.
conflictError
=
function
(
message
,
reason
)
{
return
{
return
{
"
status
"
:
"
conflict
"
,
"
status
"
:
409
,
"
message
"
:
message
,
"
message
"
:
message
,
"
reason
"
:
reason
"
reason
"
:
reason
};
};
...
@@ -654,7 +654,7 @@
...
@@ -654,7 +654,7 @@
if
(
option
.
revs_info
===
true
)
{
if
(
option
.
revs_info
===
true
)
{
res_doc
.
_revs_info
=
doc
.
_revs_info
;
res_doc
.
_revs_info
=
doc
.
_revs_info
;
}
}
return
onEnd
(
undefined
,
res_doc
);
return
onEnd
(
undefined
,
{
"
data
"
:
res_doc
}
);
}
}
if
(
specific_parameter
.
putAttachment
||
if
(
specific_parameter
.
putAttachment
||
specific_parameter
.
removeAttachment
)
{
specific_parameter
.
removeAttachment
)
{
...
@@ -687,7 +687,7 @@
...
@@ -687,7 +687,7 @@
if
(
attachment_list
[
i
]
&&
if
(
attachment_list
[
i
]
&&
doc
.
_attachment
===
doc
.
_attachment
===
attachment_list
[
i
].
_attachment
)
{
attachment_list
[
i
].
_attachment
)
{
return
onEnd
(
undefined
,
attachment_list
[
i
].
_data
);
return
onEnd
(
undefined
,
{
"
data
"
:
attachment_list
[
i
].
_data
}
);
}
}
}
}
return
onEnd
(
priv
.
notFoundError
(
return
onEnd
(
priv
.
notFoundError
(
...
...
test/jio.storage/revisionstorage.tests.js
View file @
21fc131a
This diff is collapsed.
Click to expand it.
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