summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2008-11-21 22:55:06 +0000
committerDamien F. Katz <damien@apache.org>2008-11-21 22:55:06 +0000
commit074e7510a3921416055531ae990c0f7d4020c592 (patch)
tree9df40ebdb8f0bdeb570bfd76058e78bfacbf1597 /share
parent2c260766864a56e10aa45c3b1782f640b21a0bac (diff)
Removed logging from security test and added deletion.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@719738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-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);
});
}
};