summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-09-12 09:03:43 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-09-12 09:03:43 +0000
commit2b2ab123a5e0b81d9d3967808f097a80440f1664 (patch)
treebd62419038822c656e9fe244ec211a20c2fb39ad /share/www
parentda6167eb1d0c893925b98116fe2c17cd20e36760 (diff)
additional test for non-circular commonjs require. closes COUCHDB-869
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@996270 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/design_docs.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/www/script/test/design_docs.js b/share/www/script/test/design_docs.js
index 2e3e1db1..8864225c 100644
--- a/share/www/script/test/design_docs.js
+++ b/share/www/script/test/design_docs.js
@@ -58,7 +58,8 @@ function() {
},
shows: {
simple: "function() {return 'ok'};",
- requirey : "function() { var lib = require('whatever/commonjs/upper'); return lib.testing; };"
+ requirey : "function() { var lib = require('whatever/commonjs/upper'); return lib.testing; };",
+ circular : "function() { var lib = require('whatever/commonjs/upper'); return JSON.stringify(this); };"
}
};
@@ -88,6 +89,10 @@ function() {
T(xhr.status == 200);
TEquals("PLANKTONwhatever/commonjs/upperplankton", xhr.responseText);
+ var xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_show/circular");
+ T(xhr.status == 200);
+ TEquals("javascript", JSON.parse(xhr.responseText).language);
+
// test that we get design doc info back
var dinfo = db.designInfo("_design/test");
TEquals("test", dinfo.name);