couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r781151 - /couchdb/branches/0.9.x/share/www/script/test/show_documents.js
Date Tue, 02 Jun 2009 20:26:21 GMT
Author: jchris
Date: Tue Jun  2 20:26:20 2009
New Revision: 781151

URL: http://svn.apache.org/viewvc?rev=781151&view=rev
Log:
fix up diff breakage in js test case, backported error message test that passed

Modified:
    couchdb/branches/0.9.x/share/www/script/test/show_documents.js

Modified: couchdb/branches/0.9.x/share/www/script/test/show_documents.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/share/www/script/test/show_documents.js?rev=781151&r1=781150&r2=781151&view=diff
==============================================================================
--- couchdb/branches/0.9.x/share/www/script/test/show_documents.js (original)
+++ couchdb/branches/0.9.x/share/www/script/test/show_documents.js Tue Jun  2 20:26:20 2009
@@ -33,8 +33,7 @@
         }
       }),
       "just-name" : stringFun(function(doc, req) {
-        if (docm
-          
+        if (doc) {
           return {
             body : "Just " + doc.name
           };
@@ -50,6 +49,9 @@
           json : req
         }
       }),
+      "render-error" : stringFun(function(doc, req) {
+        return noSuchVariable;
+      }),
       "xml-type" : stringFun(function(doc, req) {
          return {
            "headers" : {
@@ -138,6 +140,10 @@
   // hello template world
   xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello/"+docid);
   T(xhr.responseText == "Hello World");
+
+  // error stacktraces
+  xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/render-error/"+docid);
+  T(JSON.parse(xhr.responseText).error == "render_error");
  
   // hello template world (no docid)
   xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello");
@@ -301,4 +307,5 @@
   });
   T(xhr.getResponseHeader("Content-Type") == "text/html");
   T(xhr.responseText == "Ha ha, you said \"plankton\".");
+
 };



Mime
View raw message