From 683834888cfad2e6da1564161eda3447620374f5 Mon Sep 17 00:00:00 2001 From: Jason David Davies Date: Thu, 26 Nov 2009 14:33:14 +0000 Subject: Use TEquals() in content_negotiation test. This gives us better error messages when the assertion fails. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@884567 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/content_negotiation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/www/script/test/content_negotiation.js b/share/www/script/test/content_negotiation.js index 70a2248e..171dbb3d 100644 --- a/share/www/script/test/content_negotiation.js +++ b/share/www/script/test/content_negotiation.js @@ -18,19 +18,19 @@ couchTests.content_negotiation = function(debug) { 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")); }; -- cgit v1.2.3