Commit b9dfcca0 authored by Tristan Cavelier's avatar Tristan Cavelier

jslint splitstorage tests

parent a9cd8ddd
...@@ -50,17 +50,21 @@ ...@@ -50,17 +50,21 @@
o.tick(o); o.tick(o);
// check uploaded documents // check uploaded documents
deepEqual( deepEqual(util.jsonlocalstorage.getItem(
util.jsonlocalstorage.getItem('jio/localstorage/splitstorage/post1/' + o.uuid), 'jio/localstorage/splitstorage/post1/' + o.uuid
{"_id": o.uuid, "_underscored_meta": "uvalue", "data": "{\"meta\""}, ), {
"Check uploaded document in sub storage 1" "_id": o.uuid,
); "_underscored_meta": "uvalue",
"data": "{\"meta\""
deepEqual( }, "Check uploaded document in sub storage 1");
util.jsonlocalstorage.getItem('jio/localstorage/splitstorage/post2/' + o.uuid),
{"_id": o.uuid, "_underscored_meta": "uvalue", "data": ":\"data\"}"}, deepEqual(util.jsonlocalstorage.getItem(
"Check uploaded document in sub storage 2" 'jio/localstorage/splitstorage/post2/' + o.uuid
); ), {
"_id": o.uuid,
"_underscored_meta": "uvalue",
"data": ":\"data\"}"
}, "Check uploaded document in sub storage 2");
// post with id // post with id
o.spy(o, "value", {"ok": true, "id": "one"}, "Post document with id"); o.spy(o, "value", {"ok": true, "id": "one"}, "Post document with id");
...@@ -73,13 +77,17 @@ ...@@ -73,13 +77,17 @@
o.tick(o); o.tick(o);
// check uploaded documents // check uploaded documents
deepEqual(util.jsonlocalstorage.getItem('jio/localstorage/splitstorage/post1/one'), { deepEqual(util.jsonlocalstorage.getItem(
'jio/localstorage/splitstorage/post1/one'
), {
"_id": "one", "_id": "one",
"_underscored_meta": "uvalue", "_underscored_meta": "uvalue",
"data": "{\"meta\":\"data\"," "data": "{\"meta\":\"data\","
}, "Check uploaded document in sub storage 1"); }, "Check uploaded document in sub storage 1");
deepEqual(util.jsonlocalstorage.getItem('jio/localstorage/splitstorage/post2/one'), { deepEqual(util.jsonlocalstorage.getItem(
'jio/localstorage/splitstorage/post2/one'
), {
"_id": "one", "_id": "one",
"_underscored_meta": "uvalue", "_underscored_meta": "uvalue",
"data": "\"hello\":\"world\"}" "data": "\"hello\":\"world\"}"
...@@ -395,8 +403,12 @@ ...@@ -395,8 +403,12 @@
}); });
o.spy(o, "value", {"ok": true, "id": "one"}, "Put document"); o.spy(o, "value", {"ok": true, "id": "one"}, "Put document");
o.jio.put({"_id": "one", "_underscored_meta": "uvalue", "meta": "data"}, o.f); o.jio.put({
o.tick(o) "_id": "one",
"_underscored_meta": "uvalue",
"meta": "data"
}, o.f);
o.tick(o);
o.spy(o, "value", { o.spy(o, "value", {
"_id": "one", "_id": "one",
...@@ -407,8 +419,12 @@ ...@@ -407,8 +419,12 @@
o.tick(o); o.tick(o);
o.spy(o, "value", {"ok": true, "id": "one"}, "Put document again"); o.spy(o, "value", {"ok": true, "id": "one"}, "Put document again");
o.jio.put({"_id": "one", "_underscored_meta": "uvalue", "meow": "dog"}, o.f); o.jio.put({
o.tick(o) "_id": "one",
"_underscored_meta": "uvalue",
"meow": "dog"
}, o.f);
o.tick(o);
o.spy(o, "value", { o.spy(o, "value", {
"_id": "one", "_id": "one",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment