summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/www/script/couch_tests.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index 36cf2c25..7f392271 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -2034,12 +2034,8 @@ var tests = {
_id:"_design/test",
language: "javascript",
validate_doc_update: "(" + (function (newDoc, oldDoc, userCtx) {
- log("newDoc: " + newDoc.toSource());
- if (oldDoc) {
- log("oldDoc: " + oldDoc.toSource());
- }
// docs should have an author field.
- if (!newDoc.author) {
+ if (!newDoc._deleted && !newDoc.author) {
throw {forbidden:
"Documents must have an author field"};
}
@@ -2109,6 +2105,9 @@ var tests = {
doc = user2Db.open("testdoc");
doc.foo = 3;
T(user2Db.save(doc).ok);
+
+ // Now delete document
+ T(user2Db.deleteDoc(doc).ok);
});
}
};