Commit 0c4d7428c18cde6f3877a4875119453d6e55ab56
1 parent
62ccc88c
Exists in
master
and in
28 other branches
ActionItem23: providing descriptions for RssFeed
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1127 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
app/models/rss_feed.rb
| @@ -59,4 +59,12 @@ class RssFeed < Article | @@ -59,4 +59,12 @@ class RssFeed < Article | ||
| 59 | result | 59 | result |
| 60 | end | 60 | end |
| 61 | 61 | ||
| 62 | + def self.short_description | ||
| 63 | + _('RSS Feed') | ||
| 64 | + end | ||
| 65 | + | ||
| 66 | + def self.description | ||
| 67 | + _('Provides a news feed of your more recent articles.') | ||
| 68 | + end | ||
| 69 | + | ||
| 62 | end | 70 | end |
test/unit/rss_feed_test.rb
| @@ -124,4 +124,14 @@ class RssFeedTest < Test::Unit::TestCase | @@ -124,4 +124,14 @@ class RssFeedTest < Test::Unit::TestCase | ||
| 124 | feed.data | 124 | feed.data |
| 125 | end | 125 | end |
| 126 | 126 | ||
| 127 | + should 'provide proper short description' do | ||
| 128 | + RssFeed.expects(:==).with(Article).returns(true).at_least_once | ||
| 129 | + assert_not_equal Article.short_description, RssFeed.short_description | ||
| 130 | + end | ||
| 131 | + | ||
| 132 | + should 'provide proper description' do | ||
| 133 | + RssFeed.expects(:==).with(Article).returns(true).at_least_once | ||
| 134 | + assert_not_equal Article.description, RssFeed.description | ||
| 135 | + end | ||
| 136 | + | ||
| 127 | end | 137 | end |