diff options
author | Robert Newson <rnewson@apache.org> | 2011-05-28 16:50:32 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-05-28 16:50:32 +0000 |
commit | 697dfceee48e6dad03c2f023b5ebe0e75f5ba5cf (patch) | |
tree | 2bc170c12a0575fe9ca0f2da1d418e2e72e0f1bb /share/www/script/test/rewrite.js | |
parent | cc9965f8a703f2140e1e4ad2ddf2117653195946 (diff) | |
parent | 31e900ee642e672cec0b7b561c4bb596e1acf9a5 (diff) |
tagging 1.1.0
git-svn-id: https://svn.apache.org/repos/asf/couchdb/tags/1.1.0@1128705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/rewrite.js')
-rw-r--r-- | share/www/script/test/rewrite.js | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/share/www/script/test/rewrite.js b/share/www/script/test/rewrite.js index 86905f8f..bb188773 100644 --- a/share/www/script/test/rewrite.js +++ b/share/www/script/test/rewrite.js @@ -119,6 +119,10 @@ couchTests.rewrite = function(debug) { "query": { "startkey": ":start", "endkey": ":end" + }, + "formats": { + "start": "int", + "end": "int" } }, { @@ -164,6 +168,18 @@ couchTests.rewrite = function(debug) { } }, { + "from": "simpleForm/complexView7/:a/:b", + "to": "_view/complexView3", + "query": { + "key": [":a", ":b"], + "include_docs": ":doc" + }, + "format": { + "doc": "bool" + } + + }, + { "from": "/", "to": "_view/basicView", } @@ -348,14 +364,14 @@ couchTests.rewrite = function(debug) { T(!(/Key: 1/.test(xhr.responseText))); T(/FirstKey: 3/.test(xhr.responseText)); T(/LastKey: 8/.test(xhr.responseText)); - + // get with query params xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_rewrite/simpleForm/basicViewPath/3/8"); T(xhr.status == 200, "with query params"); T(!(/Key: 1/.test(xhr.responseText))); T(/FirstKey: 3/.test(xhr.responseText)); T(/LastKey: 8/.test(xhr.responseText)); - + // get with query params xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_rewrite/simpleForm/complexView"); T(xhr.status == 200, "with query params"); @@ -380,6 +396,11 @@ couchTests.rewrite = function(debug) { xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_rewrite/simpleForm/complexView6?a=test&b=essai"); T(xhr.status == 200, "with query params"); T(/Value: doc 4/.test(xhr.responseText)); + + xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_rewrite/simpleForm/complexView7/test/essai?doc=true"); + T(xhr.status == 200, "with query params"); + var result = JSON.parse(xhr.responseText); + T(typeof(result.rows[0].doc) === "object"); // test path relative to server designDoc.rewrites.push({ |