Commit 5a16fa8d0b0c389f50a22ea6da3670f27ffbe2ba
1 parent
0d2f2d57
Exists in
master
and in
29 other branches
ActionItem24: providing description
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1136 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
19 additions
and
0 deletions
Show diff stats
app/models/uploaded_file.rb
| @@ -11,4 +11,12 @@ class UploadedFile < Article | @@ -11,4 +11,12 @@ class UploadedFile < Article | ||
| 11 | content_type | 11 | content_type |
| 12 | end | 12 | end |
| 13 | 13 | ||
| 14 | + def self.short_description | ||
| 15 | + _("Uploaded file") | ||
| 16 | + end | ||
| 17 | + | ||
| 18 | + def self.description | ||
| 19 | + _('Upload any kind of file you want.') | ||
| 20 | + end | ||
| 21 | + | ||
| 14 | end | 22 | end |
test/unit/uploaded_file_test.rb
| @@ -21,4 +21,15 @@ class UploadedFileTest < Test::Unit::TestCase | @@ -21,4 +21,15 @@ class UploadedFileTest < Test::Unit::TestCase | ||
| 21 | f.expects(:content_type).returns('application/pdf') | 21 | f.expects(:content_type).returns('application/pdf') |
| 22 | assert_equal 'application/pdf', f.mime_type | 22 | assert_equal 'application/pdf', f.mime_type |
| 23 | end | 23 | end |
| 24 | + | ||
| 25 | + should 'provide proper description' do | ||
| 26 | + UploadedFile.stubs(:==).with(Article).returns(true) | ||
| 27 | + assert_not_equal Article.description, UploadedFile.description | ||
| 28 | + end | ||
| 29 | + | ||
| 30 | + should 'provide proper short description' do | ||
| 31 | + UploadedFile.stubs(:==).with(Article).returns(true) | ||
| 32 | + assert_not_equal Article.short_description, UploadedFile.short_description | ||
| 33 | + end | ||
| 34 | + | ||
| 24 | end | 35 | end |