Pellentes/);
+ xmlData.should.match(/<\/code><\/pre>\]\]><\/content:encoded><\/item>/);
+ xmlData.should.not.match(/ Pellentes/);
- xmlData.should.match(/<\/code><\/pre>\]\]><\/content:encoded><\/item>/);
- xmlData.should.not.match(/testing<\/h2>\n/);
+ xmlData.should.match(//);
+ xmlData.should.match(/
testing<\/h2>\n/);
+ xmlData.should.match(//);
+
+ done();
+ }).catch(done);
+ });
+
+ it('should use excerpt when no meta_description is set', function (done) {
+ data.results = {posts: [posts[0]], meta: {pagination: {pages: 1}}};
+
+ generateFeed(data).then(function (xmlData) {
+ should.exist(xmlData);
+
+ // special/optional tags
+ xmlData.should.match(/
testing<\/h2>\n/);
- xmlData.should.match(//);
- xmlData.should.match(/
testing<\/h2>\n/);
- xmlData.should.match(//);
-
- done();
- };
-
- res.locals.channel = channelUtils.getTestChannel('index');
- res.locals.channel.isRSS = true;
- rss(req, res, failTest(done));
- });
-
- it('should use excerpt when no meta_description is set', function (done) {
- rss.__set__('getData', function () {
- return Promise.resolve({
- title: 'Test Title',
- description: 'Testing Desc',
- permalinks: '/:slug/',
- results: {posts: [posts[0]], meta: {pagination: {pages: 1}}}
- });
- });
-
- res.send = function send(xmlData) {
- should.exist(xmlData);
-
- // special/optional tags
- xmlData.should.match(/