diff --git a/test/rss.test.js b/test/rss.test.js index c186020..44c0bc3 100644 --- a/test/rss.test.js +++ b/test/rss.test.js @@ -9,9 +9,9 @@ describe('rss module', function(done) { it('should work with an empty feed', function(done) { var feed = new RSS(); - expect(feed.xml()).to.equal('\n<![CDATA[Untitled RSS Feed]]>http://github.com/dylan/node-rssNodeJS RSS Module' + new Date().toUTCString() +''); + expect(feed.xml()).to.equal('\n<![CDATA[Untitled RSS Feed]]>http://github.com/dylan/node-rssRSS for Node' + new Date().toUTCString() +''); feed.item(); - expect(feed.xml()).to.equal('\n<![CDATA[Untitled RSS Feed]]>http://github.com/dylan/node-rssNodeJS RSS Module' + new Date().toUTCString() +'<![CDATA[No title]]>No title'); + expect(feed.xml()).to.equal('\n<![CDATA[Untitled RSS Feed]]>http://github.com/dylan/node-rssRSS for Node' + new Date().toUTCString() +'<![CDATA[No title]]>No title'); done(); }); @@ -129,7 +129,7 @@ describe('rss module', function(done) { date: 'May 28, 2012 04:00:00 GMT' }); - var expectedResult = '\n<![CDATA[title]]>http://example.comNodeJS RSS Module' + new Date().toUTCString() +'Sun, 20 May 2012 04:00:00 GMThttp://example.com/rss/docs.html60<![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<![CDATA[item 5 & test for categories]]>http://example.com/article5http://example.com/article5Mon, 28 May 2012 04:00:00 GMT'; + var expectedResult = '\n<![CDATA[title]]>http://example.comRSS for Node' + new Date().toUTCString() +'Sun, 20 May 2012 04:00:00 GMThttp://example.com/rss/docs.html60<![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<![CDATA[item 5 & test for categories]]>http://example.com/article5http://example.com/article5Mon, 28 May 2012 04:00:00 GMT'; var result = feed.xml(); expect(result).to.have.length(expectedResult.length); @@ -170,7 +170,7 @@ describe('rss module', function(done) { enclosure : {url: '/media/image.png', file : __dirname+'/image.png'} }); - var expectedResult = '\n<![CDATA[title]]>http://example.comNodeJS RSS Module' + new Date().toUTCString() +''+ + var expectedResult = '\n<![CDATA[title]]>http://example.comRSS for Node' + 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/article1http://example.com/article1Thu, 24 May 2012 04:00:00 GMT'+