Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
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
Ivan Tyagov
jio
Commits
0d42a75e
Commit
0d42a75e
authored
Jul 17, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gidstorage put attachemnt tests added
parent
a865ced6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
test/jiotests.js
test/jiotests.js
+74
-0
No files found.
test/jiotests.js
View file @
0d42a75e
...
@@ -8246,6 +8246,80 @@ test("Remove", function () {
...
@@ -8246,6 +8246,80 @@ test("Remove", function () {
o
.
jio
.
stop
();
o
.
jio
.
stop
();
});
});
test
(
"
putAttachment
"
,
function
()
{
var
o
=
generateTools
(
this
);
o
.
localstorage_spec
=
{
"
type
"
:
"
local
"
,
"
username
"
:
"
one
"
,
"
application_name
"
:
"
gid storage put attachment test
"
};
o
.
local_jio
=
JIO
.
newJio
(
o
.
localstorage_spec
);
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
gid
"
,
"
sub_storage
"
:
o
.
localstorage_spec
,
"
constraints
"
:
{
"
default
"
:
{
"
identifier
"
:
"
list
"
}
}
});
o
.
local_jio
.
put
({
"
_id
"
:
"
blue
"
,
"
identifier
"
:
"
a
"
});
o
.
local_jio
.
put
({
"
_id
"
:
"
green
"
,
"
identifier
"
:
[
"
ac
"
,
"
b
"
]});
o
.
clock
.
tick
(
2000
);
o
.
spy
(
o
,
'
status
'
,
409
,
'
put attachment without respecting constraints
'
+
'
-> conflicts
'
);
o
.
jio
.
putAttachment
({
"
_id
"
:
"
a
"
,
"
_attachment
"
:
"
body
"
,
"
_data
"
:
"
abc
"
,
"
_mimetype
"
:
"
text/plain
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
spy
(
o
,
'
value
'
,
{
"
ok
"
:
true
,
"
id
"
:
"
{
\"
identifier
\"
:[
\"
b
\"
]}
"
,
"
attachment
"
:
"
body
"
},
'
put attachment
'
);
o
.
jio
.
putAttachment
({
"
_id
"
:
"
{
\"
identifier
\"
:[
\"
b
\"
]}
"
,
"
_attachment
"
:
"
body
"
,
"
_data
"
:
"
abc
"
,
"
_mimetype
"
:
"
text/plain
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
spy
(
o
,
'
value
'
,
"
abc
"
,
"
Check attachment
"
);
o
.
local_jio
.
getAttachment
({
"
_id
"
:
"
green
"
,
"
_attachment
"
:
"
body
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
spy
(
o
,
'
value
'
,
{
"
ok
"
:
true
,
"
id
"
:
"
{
\"
identifier
\"
:[
\"
b
\"
]}
"
,
"
attachment
"
:
"
body
"
},
'
put attachment
'
);
o
.
jio
.
putAttachment
({
"
_id
"
:
"
{
\"
identifier
\"
:[
\"
b
\"
]}
"
,
"
_attachment
"
:
"
body
"
,
"
_data
"
:
"
def
"
,
"
_mimetype
"
:
"
text/plain
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
spy
(
o
,
'
value
'
,
"
def
"
,
"
Check attachment
"
);
o
.
local_jio
.
getAttachment
({
"
_id
"
:
"
green
"
,
"
_attachment
"
:
"
body
"
},
o
.
f
);
o
.
tick
(
o
);
o
.
local_jio
.
stop
();
o
.
jio
.
stop
();
});
};
// end thisfun
};
// end thisfun
if
(
window
.
requirejs
)
{
if
(
window
.
requirejs
)
{
...
...
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