diff options
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/test/invalid_docids.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/www/script/test/invalid_docids.js b/share/www/script/test/invalid_docids.js index 814d1a21..4fc4bbf5 100644 --- a/share/www/script/test/invalid_docids.js +++ b/share/www/script/test/invalid_docids.js @@ -29,6 +29,16 @@ couchTests.invalid_docids = function(debug) { T(e.error == "bad_request"); } + // Via PUT with _id not in body. + var res = res = db.request("PUT", "/test_suite_db/_other", {"body": "{}"}); + T(res.status == 400); + T(JSON.parse(res.responseText).error == "bad_request"); + + // Accidental POST to form handling code. + res = db.request("POST", "/test_suite_db/_tmp_view", {"body": "{}"}); + T(res.status == 400); + T(JSON.parse(res.responseText).error == "bad_request"); + // Test invalid _prefix try { db.save({"_id": "_invalid"}); |