Return-Path: Delivered-To: apmail-incubator-couchdb-commits-archive@locus.apache.org Received: (qmail 3847 invoked from network); 21 Nov 2008 22:55:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2008 22:55:57 -0000 Received: (qmail 48331 invoked by uid 500); 21 Nov 2008 22:56:06 -0000 Delivered-To: apmail-incubator-couchdb-commits-archive@incubator.apache.org Received: (qmail 48309 invoked by uid 500); 21 Nov 2008 22:56:06 -0000 Mailing-List: contact couchdb-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-commits@incubator.apache.org Received: (qmail 48300 invoked by uid 99); 21 Nov 2008 22:56:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2008 14:56:06 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2008 22:54:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B6E79238887D; Fri, 21 Nov 2008 14:55:06 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r719738 - /incubator/couchdb/trunk/share/www/script/couch_tests.js Date: Fri, 21 Nov 2008 22:55:06 -0000 To: couchdb-commits@incubator.apache.org From: damien@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081121225506.B6E79238887D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); }); } };