couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r719738 - /incubator/couchdb/trunk/share/www/script/couch_tests.js
Date Fri, 21 Nov 2008 22:55:06 GMT
Author: damien
Date: Fri Nov 21 14:55:06 2008
New Revision: 719738

URL: http://svn.apache.org/viewvc?rev=719738&view=rev
Log:
Removed logging from security test and added deletion.

Modified:
    incubator/couchdb/trunk/share/www/script/couch_tests.js

Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch_tests.js?rev=719738&r1=719737&r2=719738&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] Fri Nov 21 14:55:06 2008
@@ -2034,12 +2034,8 @@
           _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 @@
         doc = user2Db.open("testdoc");
         doc.foo = 3;
         T(user2Db.save(doc).ok);
+        
+        // Now delete document
+        T(user2Db.deleteDoc(doc).ok);
       });
   }
 };



Mime
View raw message