Updated Branches: refs/heads/2031-fix-qs-rewrite 147adec8e -> 0041c06f2
Add test for path normalization with qs params COUCHDB-2031 Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0041c06f Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0041c06f Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0041c06f Branch: refs/heads/2031-fix-qs-rewrite Commit: 0041c06f2772e6f86c187260d304adca7277bddd Parents: 147adec Author: Adam Kocoloski <[email protected]> Authored: Sat Jan 18 22:32:37 2014 -0500 Committer: Adam Kocoloski <[email protected]> Committed: Sat Jan 18 22:57:25 2014 -0500 ---------------------------------------------------------------------- share/www/script/test/rewrite.js | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/0041c06f/share/www/script/test/rewrite.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/rewrite.js b/share/www/script/test/rewrite.js index e888032..33a0b60 100644 --- a/share/www/script/test/rewrite.js +++ b/share/www/script/test/rewrite.js @@ -182,6 +182,10 @@ couchTests.rewrite = function(debug) { { "from": "/", "to": "_view/basicView", + }, + { + "from": "/" + dbName + "/*", + "to": "../../*" } ], lists: { @@ -402,6 +406,13 @@ couchTests.rewrite = function(debug) { var result = JSON.parse(xhr.responseText); T(typeof(result.rows[0].doc) === "object"); + // COUCHDB-2031 - path normalization versus qs params + xhr = CouchDB.request("GET", "/"+dbName+"/_design/test/_rewrite/"+dbName+"/_design/test?meta=true"); + T(xhr.status == 200, "path normalization works with qs params"); + var result = JSON.parse(xhr.responseText); + T(result['_id'] == "_design/test"); + T(typeof(result['_revs_info']) === "object"); + // test path relative to server designDoc.rewrites.push({ "from": "uuids",
