diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-06-25 05:17:30 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-06-25 05:17:30 +0000 |
commit | ea1ffd94840e79bac252893741e43412aaca96e6 (patch) | |
tree | 770cff04a02c61122118e3da5565c116045b7f3b /share/www/script/test/content_negotiation.js | |
parent | ceada3e64c95307f863a4010a23e2cf8f6f56460 (diff) |
use proper Accept headers in the test suite
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@957799 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/content_negotiation.js')
-rw-r--r-- | share/www/script/test/content_negotiation.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/share/www/script/test/content_negotiation.js b/share/www/script/test/content_negotiation.js index 171dbb3d..c79df948 100644 --- a/share/www/script/test/content_negotiation.js +++ b/share/www/script/test/content_negotiation.js @@ -17,11 +17,14 @@ couchTests.content_negotiation = function(debug) { if (debug) debugger; var xhr; - xhr = CouchDB.request("GET", "/test_suite_db/"); - TEquals("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type")); + // with no accept header + var req = CouchDB.newXhr(); + req.open("GET", "/test_suite_db/", false); + req.send(""); + TEquals("text/plain;charset=utf-8", req.getResponseHeader("Content-Type")); // make sure JSON responses end in a newline - var text = xhr.responseText; + var text = req.responseText; TEquals("\n", text[text.length-1]); xhr = CouchDB.request("GET", "/test_suite_db/", { |