Commit bd7e841b authored by Tristan Cavelier's avatar Tristan Cavelier

jobRule: wrong parameter given to a rule ('update' -> 'wait') fixed

parent 65fbc97a
......@@ -2215,7 +2215,7 @@ var jobRules = (function () {
that.sameAttachmentId
], that.wait);
that.addActionRule("removeAttachment", "remove",
[that.sameDocumentId, that.sameRevision], that.update);
[that.sameDocumentId, that.sameRevision], that.wait);
that.addActionRule("removeAttachment", "removeAttachment",
[that.sameDocument], that.update);
that.addActionRule("removeAttachment", "removeAttachment", [
......
......@@ -326,7 +326,7 @@ var jobRules = (function () {
that.sameAttachmentId
], that.wait);
that.addActionRule("removeAttachment", "remove",
[that.sameDocumentId, that.sameRevision], that.update);
[that.sameDocumentId, that.sameRevision], that.wait);
that.addActionRule("removeAttachment", "removeAttachment",
[that.sameDocument], that.update);
that.addActionRule("removeAttachment", "removeAttachment", [
......
......@@ -695,6 +695,19 @@ test ("One document aim jobs at the same time (Wait for job(s))" , function () {
o.tick(o, 1000, "f");
o.tick(o, "f2");
o.tick(o, "f3");
o.spy(o, "value", {"ok": true, "id": "lol"}, "Chaining callbacks");
o.jio.removeAttachment({
"_id": "lol",
"_attachment": "hu"
}, function (err, response) {
if (err) {
return;
}
o.jio.remove({"_id": "lol"}, o.f);
});
o.tick(o, 10000);
o.jio.stop();
});
......
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