Commit c689cd18bf8a783b145318c3d0d260988fbc6789

Authored by Rodrigo Souto
Committed by Antonio Terceiro
1 parent 56e8b257

Feed creation page doesn't crashes

	* The attribute feed_item_description was supposed to be an element
	of the body hash (body[:feed_item_description]) but the param passed
	was trying to access it as an article method.
app/models/rss_feed.rb
... ... @@ -14,6 +14,14 @@ class RssFeed < Article
14 14 end
15 15 alias :settings :body
16 16  
  17 + def feed_item_description
  18 + self.body[:feed_item_description]
  19 + end
  20 +
  21 + def feed_item_description=(feed_item_description)
  22 + self.body[:feed_item_description] = feed_item_description
  23 + end
  24 +
17 25 # The maximum number of articles to be displayed in the RSS feed. Default: 10
18 26 def limit
19 27 settings[:limit] || 10
... ...
test/functional/cms_controller_test.rb
... ... @@ -194,6 +194,14 @@ class CmsControllerTest < Test::Unit::TestCase
194 194 end
195 195 end
196 196  
  197 + should 'be able to acess Rss feed creation page' do
  198 + login_as(profile.identifier)
  199 + assert_nothing_raised do
  200 + post :new, :type => "RssFeed", :profile => profile.identifier
  201 + end
  202 + assert_response 200
  203 + end
  204 +
197 205 should 'be able to create a RSS feed' do
198 206 login_as(profile.identifier)
199 207 assert_difference RssFeed, :count do
... ...