Add test for path normalization with qs params
COUCHDB-2031
diff --git a/script/test/rewrite.js b/script/test/rewrite.js
index e888032..5c56fa5 100644
--- a/script/test/rewrite.js
+++ b/script/test/rewrite.js
@@ -182,6 +182,10 @@
{
"from": "/",
"to": "_view/basicView",
+ },
+ {
+ "from": "/db/*",
+ "to": "../../*"
}
],
lists: {
@@ -402,6 +406,13 @@
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/db/_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",