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,7 +181,7 @@ class ProposalsDiscussionPlugin::ProposalTask < Task
181 end 181 end
182 182
183 def information 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 end 185 end
186 186
187 def icon 187 def icon
test/unit/proposal_task_test.rb
@@ -77,4 +77,10 @@ class ProposalTaskTest &lt; ActiveSupport::TestCase @@ -77,4 +77,10 @@ class ProposalTaskTest &lt; ActiveSupport::TestCase
77 assert_equal person2, task.responsible 77 assert_equal person2, task.responsible
78 end 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 end 86 end