summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-01-30 03:50:44 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-01-30 03:50:44 +0000
commitd6fa592563650395d2dfbc814915d239c335bea3 (patch)
tree1edf7f9a70a93291486e50cde2d2efc250067cfa /share/www/script
parenta00cfd9770fad31639905ff8f45e702fcca6e639 (diff)
swap 412 ad 409 error codes. fixes COUCHDB-226
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/couch_tests.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index 89a979b4..8aa9ad15 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -34,9 +34,9 @@ var tests = {
db.createDb();
- // PUT on existing DB should return 409 instead of 500
+ // PUT on existing DB should return 412 instead of 500
xhr = CouchDB.request("PUT", "/test_suite_db/");
- T(xhr.status == 409);
+ T(xhr.status == 412);
if (debug) debugger;
// Get the database info, check the db_name
@@ -443,7 +443,7 @@ var tests = {
var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied", {
headers: {"Destination":"doc_to_be_overwritten"}
});
- T(xhr.status == 412); // conflict
+ T(xhr.status == 409); // conflict
var rev = db.open("doc_to_be_overwritten")._rev;
var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied", {
@@ -958,7 +958,7 @@ var tests = {
// test without rev, should fail
var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc2/foo2.txt");
- T(xhr.status == 412);
+ T(xhr.status == 409);
// test with rev, should not fail
var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc2/foo2.txt?rev=" + rev);
@@ -982,7 +982,7 @@ var tests = {
headers:{"Content-Type":"text/plain;charset=utf-8"},
body:bin_data
});
- T(xhr.status == 412);
+ T(xhr.status == 409);
var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev, {
headers:{"Content-Type":"text/plain;charset=utf-8"},
@@ -1079,7 +1079,7 @@ var tests = {
headers:{"Content-Type":"text/plain;charset=utf-8"},
body:"Just some text"
});
- T(xhr.status == 412);
+ T(xhr.status == 409);
var xhr = CouchDB.request("PUT", "/"+dbName+"/bin_doc/foo/bar2.txt?rev=" + binAttDoc._rev, {
body:"This is no base64 encoded text",
@@ -1148,7 +1148,7 @@ var tests = {
headers:{"Content-Type":"text/plain;charset=utf-8"},
body:"Just some text"
});
- T(xhr.status == 412);
+ T(xhr.status == 409);
var xhr = CouchDB.request("PUT", "/"+dbName+"/_design%2Fbin_doc/foo/bar2.txt?rev=" + binAttDoc._rev, {
body:"This is no base64 encoded text",
@@ -2292,7 +2292,7 @@ var tests = {
xhr = CouchDB.request("PUT", "/test_suite_db/1", {
body: "{}"
});
- T(xhr.status == 412)
+ T(xhr.status == 409)
// verify get w/Etag
xhr = CouchDB.request("GET", "/test_suite_db/1", {
@@ -2308,7 +2308,7 @@ var tests = {
xhr = CouchDB.request("DELETE", "/test_suite_db/1", {
headers: {"if-match": etagOld}
});
- T(xhr.status == 412);
+ T(xhr.status == 409);
//now do it for real
xhr = CouchDB.request("DELETE", "/test_suite_db/1", {