couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasondav...@apache.org
Subject svn commit: r884567 - /couchdb/trunk/share/www/script/test/content_negotiation.js
Date Thu, 26 Nov 2009 14:33:15 GMT
Author: jasondavies
Date: Thu Nov 26 14:33:14 2009
New Revision: 884567

URL: http://svn.apache.org/viewvc?rev=884567&view=rev
Log:
Use TEquals() in content_negotiation test.

This gives us better error messages when the assertion fails.

Modified:
    couchdb/trunk/share/www/script/test/content_negotiation.js

Modified: couchdb/trunk/share/www/script/test/content_negotiation.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/content_negotiation.js?rev=884567&r1=884566&r2=884567&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/content_negotiation.js (original)
+++ couchdb/trunk/share/www/script/test/content_negotiation.js Thu Nov 26 14:33:14 2009
@@ -18,19 +18,19 @@
   var xhr;
 
   xhr = CouchDB.request("GET", "/test_suite_db/");
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEquals("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // make sure JSON responses end in a newline
   var text = xhr.responseText;
-  T(text[text.length-1] == "\n");
+  TEquals("\n", text[text.length-1]);
 
   xhr = CouchDB.request("GET", "/test_suite_db/", {
     headers: {"Accept": "text/html;text/plain;*/*"}
   });
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEquals("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   xhr = CouchDB.request("GET", "/test_suite_db/", {
     headers: {"Accept": "application/json"}
   });
-  T(xhr.getResponseHeader("Content-Type") == "application/json");
+  TEquals("application/json", xhr.getResponseHeader("Content-Type"));
 };



Mime
View raw message