Commit 22081f3ec6e7e6ec3c55c2149c56f92ac7e2f154
1 parent
289efcbd
Exists in
master
and in
29 other branches
ActionItem23: linking to profile in RSS feed
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1144 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
7 additions
and
3 deletions
Show diff stats
app/models/rss_feed.rb
... | ... | @@ -69,8 +69,7 @@ class RssFeed < Article |
69 | 69 | xml.rss(:version=>"2.0") do |
70 | 70 | xml.channel do |
71 | 71 | xml.title(_("%s's RSS feed") % (self.profile.name)) |
72 | - # FIXME link to profile | |
73 | - xml.link("http://www.yourDomain.com") | |
72 | + xml.link(self.profile.url) | |
74 | 73 | xml.description(_("%s's content published at %s") % [self.profile.name, self.profile.environment.name]) |
75 | 74 | xml.language("pt_BR") |
76 | 75 | for article in articles | ... | ... |
test/unit/rss_feed_test.rb
... | ... | @@ -107,7 +107,12 @@ class RssFeedTest < Test::Unit::TestCase |
107 | 107 | end |
108 | 108 | |
109 | 109 | should 'provide link to profile' do |
110 | - flunk 'pending' | |
110 | + profile = create_user('testuser').person | |
111 | + feed = RssFeed.new(:name => 'feed') | |
112 | + feed.profile = profile | |
113 | + feed.save! | |
114 | + | |
115 | + assert_match "<link>#{profile.url}</link>", feed.data | |
111 | 116 | end |
112 | 117 | |
113 | 118 | should 'provide link to each article' do | ... | ... |