0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #2126 from aiampogi/issue-2114-rssFeeds

Removed author tag inside channel tag in RSS
This commit is contained in:
Hannah Wolfe 2014-02-07 11:52:41 +00:00
commit 0dc0a9bb7c
2 changed files with 15 additions and 2 deletions

View file

@ -155,7 +155,6 @@ frontendControllers = {
title: title,
description: description,
generator: 'Ghost v' + res.locals.version,
author: user ? user.name : null,
feed_url: feedUrl,
site_url: siteUrl,
ttl: '60'
@ -184,7 +183,8 @@ frontendControllers = {
guid: post.uuid,
url: config.paths.urlFor('post', {post: post, permalinks: permalinks}, true),
date: post.published_at,
categories: _.pluck(post.tags, 'name')
categories: _.pluck(post.tags, 'name'),
author: user ? user.name : null
},
content = post.html;

View file

@ -29,6 +29,19 @@ CasperTest.begin('Ensure that RSS is available', 11, function suite(test) {
});
}, false);
CasperTest.begin('Ensure that author element is not included. Only dc:creator', 3, function suite(test) {
CasperTest.Routines.togglePermalinks.run('off');
casper.thenOpen(url + 'rss/', function (response) {
var content = this.getPageContent(),
author = '<author>',
postCreator = '<dc:creator><![CDATA[Test User]]>';
test.assertEqual(response.status, 200, 'Response status should be 200.');
test.assert(content.indexOf(author) < 0, 'Author element should not be included');
test.assert(content.indexOf(postCreator) >= 0, 'Welcome post should have Test User as the creator.');
});
}, false);
CasperTest.begin('Ensures dated permalinks works with RSS', 2, function suite(test) {
CasperTest.Routines.togglePermalinks.run('on');
casper.thenOpen(url + 'rss/', function (response) {