diff --git a/test/test.js b/test/test.js index d0514d9..f6f915b 100644 --- a/test/test.js +++ b/test/test.js @@ -52,8 +52,11 @@ module.exports = { date: 'May 27, 2012' }); - console.log(feed.xml(true)); - test.equal(feed.xml(), '\n<![CDATA[title]]>http://example.comNodeJS RSS Module' + new Date().toUTCString() +'<![CDATA[item 1]]>http://example.com/article1Thu, 24 May 2012 04:00:00 GMT<![CDATA[item 2]]>http://example.com/article2Fri, 25 May 2012 04:00:00 GMT<![CDATA[item 3]]>item3Sat, 26 May 2012 04:00:00 GMT<![CDATA[item 4 & html test with <strong>]]>html]]>http://example.com/article4?this&thatSun, 27 May 2012 04:00:00 GMT'); + var expectedResult = '\n<![CDATA[title]]>http://example.comNodeJS RSS Module' + new Date().toUTCString() +'<![CDATA[item 1]]>http://example.com/article1http://example.com/article1Thu, 24 May 2012 04:00:00 GMT<![CDATA[item 2]]>http://example.com/article2http://example.com/article2Fri, 25 May 2012 04:00:00 GMT<![CDATA[item 3]]>http://example.com/article3item3Sat, 26 May 2012 04:00:00 GMT<![CDATA[item 4 & html test with <strong>]]>html]]>http://example.com/article4?this&thathttp://example.com/article4?this&thatSun, 27 May 2012 04:00:00 GMT'; + var result = feed.xml(); + + test.equal(result.length, expectedResult.length); + test.equal(result, expectedResult); test.done(); } };