summaryrefslogtreecommitdiff
path: root/share/www/script/test/view_errors.js
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-07-20 01:04:22 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-07-20 01:04:22 +0000
commit9ebb79a24eecc2004a211b2475ffb7b34f31d138 (patch)
tree9b3f928568d142b8206d3d2d8a6d6e9f22c07278 /share/www/script/test/view_errors.js
parent2f25ac7fb8fc46a45ec0e3e746a6104becff6ce6 (diff)
require application/json content-type in the remaining places where a POST has side-effects
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@965702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/view_errors.js')
-rw-r--r--share/www/script/test/view_errors.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/www/script/test/view_errors.js b/share/www/script/test/view_errors.js
index c6607ad4..a211c061 100644
--- a/share/www/script/test/view_errors.js
+++ b/share/www/script/test/view_errors.js
@@ -56,14 +56,14 @@ couchTests.view_errors = function(debug) {
});
T(JSON.parse(xhr.responseText).error == "bad_request");
- // views should ignore Content-Type, like the rest of CouchDB
+ // content type must be json
var xhr = CouchDB.request("POST", "/test_suite_db/_temp_view", {
headers: {"Content-Type": "application/x-www-form-urlencoded"},
body: JSON.stringify({language: "javascript",
map : "function(doc){}"
})
});
- T(xhr.status == 200);
+ T(xhr.status == 415);
var map = function (doc) {emit(doc.integer, doc.integer);};