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
a410f312
Commit
a410f312
authored
Sep 05, 2017
by
Vincent Bechu
Committed by
Vincent Bechu
Sep 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[documentstorage] Add test to support utf-8 char
parent
5347ff53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
test/jio.storage/documentstorage.tests.js
test/jio.storage/documentstorage.tests.js
+40
-0
No files found.
test/jio.storage/documentstorage.tests.js
View file @
a410f312
...
...
@@ -236,6 +236,46 @@
});
});
test
(
"
with special utf-8 char
"
,
function
()
{
stop
();
expect
(
5
);
Storage200
.
prototype
.
putAttachment
=
function
(
id
,
name
,
blob
)
{
equal
(
blob
.
type
,
"
application/json
"
,
"
Blob type is OK
"
);
equal
(
id
,
"
foo
"
,
"
putAttachment 200 called
"
);
equal
(
name
,
"
jio_document/Zm9vw6kKYmFy5rWL6K+V5Zub8J+YiA==.json
"
,
"
putAttachment 200 called
"
);
return
jIO
.
util
.
readBlobAsText
(
blob
)
.
then
(
function
(
result
)
{
deepEqual
(
JSON
.
parse
(
result
.
target
.
result
),
{
"
title
"
:
"
fooé
\n
bar测试四😈
"
},
"
JSON is in blob
"
);
return
id
;
});
};
var
jio
=
jIO
.
createJIO
({
type
:
"
document
"
,
document_id
:
"
foo
"
,
sub_storage
:
{
type
:
"
documentstorage200
"
}
});
jio
.
put
(
"
fooé
\n
bar测试四😈
"
,
{
"
title
"
:
"
fooé
\n
bar测试四😈
"
})
.
then
(
function
(
result
)
{
equal
(
result
,
"
fooé
\n
bar测试四😈
"
);
})
.
fail
(
function
(
error
)
{
ok
(
false
,
error
);
})
.
always
(
function
()
{
start
();
});
});
/////////////////////////////////////////////////////////////////
// documentStorage.remove
/////////////////////////////////////////////////////////////////
...
...
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