Commit bc3e832ee4f96edbefa5d377a332e4c67cdffa35

Authored by Victor Costa
1 parent 7e2853fc

Fix task information with int abstract

lib/proposals_discussion_plugin/proposal_task.rb
... ... @@ -181,7 +181,7 @@ class ProposalsDiscussionPlugin::ProposalTask < Task
181 181 end
182 182  
183 183 def information
184   - {:message => _("<span class=\"requestor\">%{requestor}</span> <span class=\"action-label\">wants to send the following proposal.</span><br/><span class=\"abstract\">%{abstract}</span>"), :variables => {:abstract => CGI.escapeHTML(abstract)}}
  184 + {:message => _("<span class=\"requestor\">%{requestor}</span> <span class=\"action-label\">wants to send the following proposal.</span><br/><span class=\"abstract\">%{abstract}</span>"), :variables => {:abstract => CGI.escapeHTML(abstract.to_s)}}
185 185 end
186 186  
187 187 def icon
... ...
test/unit/proposal_task_test.rb
... ... @@ -77,4 +77,10 @@ class ProposalTaskTest &lt; ActiveSupport::TestCase
77 77 assert_equal person2, task.responsible
78 78 end
79 79  
  80 + should 'do not fail on task information with integer as abstract' do
  81 + task = ProposalsDiscussionPlugin::ProposalTask.new
  82 + task.expects(:abstract).returns(49)
  83 + assert task.information.present?
  84 + end
  85 +
80 86 end
... ...