Commit 0da926a2f6e4c272b19e9bd0d350d12cd60643c3

Authored by AntonioTerceiro
1 parent f77d834b

ActionItem23: aliasing body as settings



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1119 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/rss_feed.rb
... ... @@ -6,6 +6,7 @@ class RssFeed < Article
6 6 def body
7 7 self[:body] ||= {}
8 8 end
  9 + alias :settings :body
9 10  
10 11 # TODO
11 12 def to_html
... ...
test/unit/rss_feed_test.rb
... ... @@ -18,6 +18,11 @@ class RssFeedTest < Test::Unit::TestCase
18 18 assert !feed.errors.invalid?(:body)
19 19 end
20 20  
  21 + should 'alias body as "settings"' do
  22 + feed = RssFeed.new
  23 + assert_same feed.body, feed.settings
  24 + end
  25 +
21 26 should 'list recent articles of profile when top-level' do
22 27 profile = create_user('testuser').person
23 28 a1 = profile.articles.build(:name => 'article 1'); a1.save!
... ... @@ -44,6 +49,8 @@ class RssFeedTest < Test::Unit::TestCase
44 49 end
45 50  
46 51 should 'be able to choose to put abstract or entire body on feed' do
  52 + #feed = RssFeed.new
  53 + #feed.
47 54 flunk 'pending'
48 55 end
49 56  
... ...