From 2fcfa641f6572368f60a260bfd6c8bf11a5d5b20 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Tue, 2 Feb 2010 12:12:46 +0000 Subject: 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 --- share/www/script/test/rewrite.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'share') 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 -- cgit v1.2.3