summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-03-18 12:15:17 +0000
committerJan Lehnardt <jan@apache.org>2009-03-18 12:15:17 +0000
commit56063e82a2ad88a6c4125906d64a6de7e8a8b7ee (patch)
tree11a0cc21528f67bfd33858162d3b474e92f271aa /share/www
parent2ee3c710ae726c31812cabb4827e777687ab660c (diff)
remove MOVE requests as they can't sensibly be supported and COPY & DELETE does the same thing
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@755575 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/copy_move_doc.js25
1 files changed, 4 insertions, 21 deletions
diff --git a/share/www/script/test/copy_move_doc.js b/share/www/script/test/copy_move_doc.js
index 050f8113..1b3ab0f9 100644
--- a/share/www/script/test/copy_move_doc.js
+++ b/share/www/script/test/copy_move_doc.js
@@ -10,7 +10,7 @@
// License for the specific language governing permissions and limitations under
// the License.
-couchTests.copy_move_doc = function(debug) {
+couchTests.copy_doc = function(debug) {
var db = new CouchDB("test_suite_db");
db.deleteDb();
db.createDb();
@@ -25,36 +25,19 @@ couchTests.copy_move_doc = function(debug) {
T(xhr.status == 201);
T(db.open("doc_that_was_copied").v == 1);
- // move a doc
-
- // test error condition
- var xhr = CouchDB.request("MOVE", "/test_suite_db/doc_to_be_copied", {
- headers: {"Destination":"doc_that_was_moved"}
- });
- T(xhr.status == 400); // bad request, MOVE requires source rev.
-
- var rev = db.open("doc_to_be_copied")._rev;
- var xhr = CouchDB.request("MOVE", "/test_suite_db/doc_to_be_copied?rev=" + rev, {
- headers: {"Destination":"doc_that_was_moved"}
- });
-
- T(xhr.status == 201);
- T(db.open("doc_that_was_moved").v == 1);
- T(db.open("doc_to_be_copied") == null);
-
// COPY with existing target
- T(db.save({_id:"doc_to_be_copied",v:1}).ok);
+ T(db.save({_id:"doc_to_be_copied2",v:1}).ok);
var doc = db.save({_id:"doc_to_be_overwritten",v:2});
T(doc.ok);
// error condition
- var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied", {
+ var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied2", {
headers: {"Destination":"doc_to_be_overwritten"}
});
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", {
+ var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied2", {
headers: {"Destination":"doc_to_be_overwritten?rev=" + rev}
});
T(xhr.status == 201);