Commit 8bc2040b authored by Tristan Cavelier's avatar Tristan Cavelier

replicatestorage tests added

parent b79b2458
...@@ -19,18 +19,35 @@ ...@@ -19,18 +19,35 @@
module("ReplicateStorage"); module("ReplicateStorage");
test("Substorage management", function () { test("Substorage management", function () {
expect(2); expect(3);
var clock = sinon.useFakeTimers(), jio = jIO.newJio({ var clock = sinon.useFakeTimers(), jio = jIO.newJio({
"type": "replicate", "type": "replicate",
"storage_list": [{ "storage_list": [{
"type": "dummy" "type": "dummy"
}, { }, {
"type": "dummy", "type": "dummy"
"mode": "always fail",
}] }]
}); });
// post without id // post without id
jio.post({}, util.spyJioCallback("value", {
"id": "document id a",
"ok": true
}, "2 Storages DONE + DONE = DONE"));
clock.tick(1000);
util.closeAndcleanUpJio(jio);
jio = jIO.newJio({
"type": "replicate",
"storage_list": [{
"type": "dummy"
}, {
"type": "dummy",
"mode": "always fail"
}]
});
jio.post({}, util.spyJioCallback("value", { jio.post({}, util.spyJioCallback("value", {
"id": "document id a", "id": "document id a",
"ok": true "ok": true
......
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