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
4306f29f
Commit
4306f29f
authored
Jun 25, 2018
by
Bryan Kaperick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test to verify removeAttachment does not have the same timestamp issue as remove had.
parent
87f4360e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
test/jio.storage/historystorage.tests.js
test/jio.storage/historystorage.tests.js
+37
-1
No files found.
test/jio.storage/historystorage.tests.js
View file @
4306f29f
...
@@ -173,6 +173,41 @@
...
@@ -173,6 +173,41 @@
.
always
(
function
()
{
start
();
});
.
always
(
function
()
{
start
();
});
});
});
test
(
"
Ordering of put and remove attachments is correct
"
,
function
()
{
stop
();
expect
(
1
);
var
jio
=
this
.
jio
,
blob1
=
this
.
blob1
,
blob2
=
this
.
blob2
;
jio
.
put
(
"
doc
"
,
{
title
:
"
foo0
"
})
.
push
(
function
()
{
return
jio
.
putAttachment
(
"
doc
"
,
"
data
"
,
blob1
);
})
.
push
(
function
()
{
return
jio
.
removeAttachment
(
"
doc
"
,
"
data
"
);
})
.
push
(
function
()
{
return
jio
.
putAttachment
(
"
doc
"
,
"
data
"
,
blob2
);
})
.
push
(
function
()
{
return
jio
.
getAttachment
(
"
doc
"
,
"
data
"
);
})
.
push
(
function
(
result
)
{
deepEqual
(
result
,
blob2
,
"
removeAttachment happens before putAttachment
"
);
})
.
fail
(
function
(
error
)
{
//console.log(error);
ok
(
false
,
error
);
})
.
always
(
function
()
{
start
();
});
});
test
(
"
Correctness of allAttachments method
"
,
test
(
"
Correctness of allAttachments method
"
,
function
()
{
function
()
{
stop
();
stop
();
...
@@ -723,7 +758,6 @@
...
@@ -723,7 +758,6 @@
});
});
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
jio
.
allDocs
({
select_list
:
[
"
title
"
,
"
subtitle
"
]}),
jio
.
allDocs
({
select_list
:
[
"
title
"
,
"
subtitle
"
]}),
jio
.
allDocs
({
jio
.
allDocs
({
...
@@ -775,6 +809,8 @@
...
@@ -775,6 +809,8 @@
);
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
// These are all equivalent queries in that they should return the
// same documents in the correct order
return
RSVP
.
all
([
return
RSVP
.
all
([
jio
.
allDocs
({
jio
.
allDocs
({
query
:
"
_timestamp:
"
+
timestamps
.
doc
[
1
],
query
:
"
_timestamp:
"
+
timestamps
.
doc
[
1
],
...
...
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