summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorBenoit Chesneau <benoitc@apache.org>2010-02-02 12:12:46 +0000
committerBenoit Chesneau <benoitc@apache.org>2010-02-02 12:12:46 +0000
commit2fcfa641f6572368f60a260bfd6c8bf11a5d5b20 (patch)
tree2165f652161cf5530ed9c6d77aa0606dfe617d88 /share/www
parent1ba1a72eba6b02e4b499d903991423a76f52ad0d (diff)
would have been strange to be abble ../../_changes and not
../../../_uuids in rewriting. Instead using couch_httpd_db:handle_request we now use couch_httpd:handle_request. Add one more unitest to test it. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@905599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/rewrite.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/www/script/test/rewrite.js b/share/www/script/test/rewrite.js
index 46e7e477..87c3fac6 100644
--- a/share/www/script/test/rewrite.js
+++ b/share/www/script/test/rewrite.js
@@ -130,6 +130,10 @@ couchTests.rewrite = function(debug) {
"query": {
"key": {"c": 1}
}
+ },
+ {
+ "from": "uuids",
+ "to": "../../../_uuids"
}
@@ -314,6 +318,15 @@ couchTests.rewrite = function(debug) {
xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_rewrite/simpleForm/complexView4");
T(xhr.status == 200, "with query params");
T(/Value: doc 5/.test(xhr.responseText));
+
+
+ // test path relative to server
+
+ var xhr = CouchDB.request("GET", "/_uuids");
+ T(xhr.status == 200);
+ var result = JSON.parse(xhr.responseText);
+ T(result.uuids.length == 1);
+ var first = result.uuids[0];
});
} \ No newline at end of file