Commit 9e94fb54 authored by Romain Courteaud's avatar Romain Courteaud

more fixes

parent c883162c
......@@ -3298,7 +3298,7 @@
test("signature document is not synced", function () {
stop();
expect(6);
expect(7);
var context = this;
......@@ -3307,26 +3307,34 @@
this.jio = jIO.createJIO({
type: "replicate",
local_sub_storage: {
type: "uuid",
sub_storage: {
type: "document",
document_id: "/",
sub_storage: {
type: "local",
sessiononly: true
}
}
type: "memory"
},
remote_sub_storage: {
type: "memory"
}
});
// Hack to ensure that the signature is stored in the
// same local storage, even if memory is used
context.jio.__storage._signature_sub_storage
.__storage._sub_storage
.__storage._sub_storage
.__storage._database =
context.jio.__storage._local_sub_storage
.__storage._database;
context.jio.post({"title": "foo"})
context.jio.put('barfoo', {"title": "foo"})
.then(function () {
return context.jio.repair();
})
.then(function () {
// Check that signature is a local document
// Otherwise, the test is meaningless
return context.jio.__storage._local_sub_storage.get(
context.jio.__storage._signature_hash
);
})
.then(function (result) {
deepEqual(result, {});
return context.jio.__storage._remote_sub_storage.get(
context.jio.__storage._signature_hash
);
......@@ -3334,7 +3342,7 @@
.fail(function (error) {
ok(error instanceof jIO.util.jIOError);
equal(error.message, "Cannot find document: " +
"_replicate_8662994dcefb3a2ceec61e86953efda8ec6520d6");
"_replicate_a0538a9def720b35ac7fd813d2ca008a5183375a");
equal(error.status_code, 404);
})
.then(function () {
......@@ -3348,7 +3356,7 @@
.fail(function (error) {
ok(error instanceof jIO.util.jIOError);
equal(error.message, "Cannot find document: " +
"_replicate_8662994dcefb3a2ceec61e86953efda8ec6520d6");
"_replicate_a0538a9def720b35ac7fd813d2ca008a5183375a");
equal(error.status_code, 404);
})
.fail(function (error) {
......
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