Commit c1dc8d70 authored by Tristan Cavelier's avatar Tristan Cavelier

Revision storage put tests updated: save document ok even if rev is not provided

parent 7cec2852
......@@ -1342,11 +1342,17 @@ test ("Put", function(){
"Check document tree"
);
// put and document already exists
o.spy (o, "status", 409, "Update the document");
o.jio.put({"_id": "put1", "title": "myPut2"}, o.f);
// put without rev and document already exists
o.doc = {"_id": "put1", "title": "myPut2"};
o.rev = "1-"+generateRevisionHash(o.doc, o.revisions);
o.spy (o, "value", {"ok": true, "id": "put1", "rev": o.rev},
"Put same document without revision");
o.jio.put(o.doc, o.f);
o.tick(o);
o.doc_tree.children.unshift({
"rev": o.rev, "status": "available", "children": []
});
// put + revision
o.doc = {"_id": "put1", "_rev": o.rev, "title": "myPut2"};
......
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