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
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
Bryan Kaperick
jio
Commits
aa6ed5aa
Commit
aa6ed5aa
authored
Jun 22, 2018
by
Bryan Kaperick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added one additional attachment test.
parent
cf5671c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
test/jio.storage/historystorage.tests.js
test/jio.storage/historystorage.tests.js
+53
-0
test/jio.storage/tmp.txt
test/jio.storage/tmp.txt
+0
-0
No files found.
test/jio.storage/historystorage.tests.js
View file @
aa6ed5aa
...
@@ -281,6 +281,59 @@
...
@@ -281,6 +281,59 @@
.
always
(
function
()
{
start
();
});
.
always
(
function
()
{
start
();
});
});
});
test
(
"
Correctness of allAttachments method
"
,
function
()
{
stop
();
expect
(
4
);
var
jio
=
this
.
jio
,
timestamps
=
jio
.
__storage
.
_timestamps
,
blob1
=
this
.
blob1
,
blob2
=
this
.
blob2
,
other_blob1
=
this
.
other_blob
,
other_blob2
=
new
Blob
([
'
asdf
'
]);
putFullDoc
(
jio
,
"
doc
"
,
{},
"
data
"
,
blob1
)
.
push
(
function
()
{
return
jio
.
putAttachment
(
"
doc
"
,
"
data
"
,
blob2
);
})
.
push
(
function
()
{
return
jio
.
putAttachment
(
"
doc
"
,
"
other_data
"
,
other_blob1
);
})
.
push
(
function
()
{
return
jio
.
putAttachment
(
"
doc
"
,
"
other_data
"
,
other_blob2
);
})
.
push
(
function
()
{
return
jio
.
getAttachment
(
timestamps
.
doc
.
data
[
0
],
"
data
"
);
})
.
push
(
function
(
result
)
{
deepEqual
(
result
,
blob1
,
"
Get old version of first attachment
"
);
return
jio
.
getAttachment
(
timestamps
.
doc
.
data
[
1
],
"
data
"
);
})
.
push
(
function
(
result
)
{
deepEqual
(
result
,
blob2
,
"
Get current version of first attachment
"
);
return
jio
.
getAttachment
(
timestamps
.
doc
.
other_data
[
0
],
"
other_data
"
);
})
.
push
(
function
(
result
)
{
deepEqual
(
result
,
other_blob1
,
"
Get old version of second attachment
"
);
return
jio
.
getAttachment
(
timestamps
.
doc
.
other_data
[
1
],
"
other_data
"
);
})
.
push
(
function
(
result
)
{
deepEqual
(
result
,
other_blob2
,
"
Get current version of second attachment
"
);
})
.
fail
(
function
(
error
)
{
//console.log(error);
ok
(
false
,
error
);
})
.
always
(
function
()
{
start
();
});
});
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Querying older revisions
// Querying older revisions
...
...
test/jio.storage/tmp.txt
0 → 100644
View file @
aa6ed5aa
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