Commit acbf97a03689e19770bb801d208c7fbbb2e0224b

Authored by AntonioTerceiro
1 parent aaebddf2

ActionItem21: providing description for article

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@964 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/article.rb
... ... @@ -35,6 +35,10 @@ class Article < ActiveRecord::Base
35 35 'text/html'
36 36 end
37 37  
  38 + def mime_type_description
  39 + _('Text document')
  40 + end
  41 +
38 42 def title
39 43 name
40 44 end
... ...
test/unit/article_test.rb
... ... @@ -70,4 +70,12 @@ class ArticleTest < Test::Unit::TestCase
70 70 assert_equal 'text-html', Article.new.icon_name
71 71 end
72 72  
  73 + should 'provide a (translatable) description' do
  74 + result = 'the description'
  75 +
  76 + a = Article.new
  77 + a.expects(:_).returns(result)
  78 + assert_same result, a.mime_type_description
  79 + end
  80 +
73 81 end
... ...