summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2014-01-18 22:32:37 -0500
committerbenoitc <bchesneau@gmail.com>2014-01-29 11:23:30 +0100
commit705d4332e2c2ed001d1ae58b8ef5bfd4ead44489 (patch)
tree60563e971124f3b9519a56fc723a3553305a41bb
parenta608b83fffeda84be7d24814c6c80439362083d7 (diff)
downloadcouchdb-705d4332e2c2ed001d1ae58b8ef5bfd4ead44489.tar.gz
Add test for path normalization with qs params
COUCHDB-2031
-rw-r--r--share/www/script/test/rewrite.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/www/script/test/rewrite.js b/share/www/script/test/rewrite.js
index e88803291..5c56fa503 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": "/db/*",
+ "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/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",