From 9007e2d21dea8b0185c0096b30364a8ee40a3867 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 13 Mar 2009 22:15:34 +0000 Subject: Commit Damien's rep_security branch to trunk. Changes bulk_docs conflict checking. Breaks file format, see mailing list for data upgrade procedure, or http://wiki.apache.org/couchdb/Breaking_changes git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@753448 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/invalid_docids.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'share/www/script/test/invalid_docids.js') diff --git a/share/www/script/test/invalid_docids.js b/share/www/script/test/invalid_docids.js index 6ed01f0b..814d1a21 100644 --- a/share/www/script/test/invalid_docids.js +++ b/share/www/script/test/invalid_docids.js @@ -23,32 +23,32 @@ couchTests.invalid_docids = function(debug) { //Test non-string try { db.save({"_id": 1}); - T(1 == 0); + T(1 == 0, "doc id must be string"); } catch(e) { T(db.last_req.status == 400); - T(e.error == "invalid_doc"); + T(e.error == "bad_request"); } // Test invalid _prefix try { db.save({"_id": "_invalid"}); - T(1 == 0); + T(1 == 0, "doc id may not start with underscore"); } catch(e) { T(db.last_req.status == 400); - T(e.error == "invalid_doc"); + T(e.error == "bad_request"); } // Test _bulk_docs explicitly. var docs = [{"_id": "_design/foo"}, {"_id": "_local/bar"}]; - T(db.bulkSave(docs).ok); + db.bulkSave(docs); docs.forEach(function(d) {T(db.open(d._id)._id == d._id);}); docs = [{"_id": "_invalid"}]; try { db.bulkSave(docs); - T(1 == 0); + T(1 == 0, "doc id may not start with underscore, even in bulk docs"); } catch(e) { T(db.last_req.status == 400); - T(e.error == "invalid_doc"); + T(e.error == "bad_request"); } }; -- cgit v1.2.3