diff --git a/app/models/uploaded_file.rb b/app/models/uploaded_file.rb index 556d62e..6132067 100644 --- a/app/models/uploaded_file.rb +++ b/app/models/uploaded_file.rb @@ -11,4 +11,12 @@ class UploadedFile < Article content_type end + def self.short_description + _("Uploaded file") + end + + def self.description + _('Upload any kind of file you want.') + end + end diff --git a/test/unit/uploaded_file_test.rb b/test/unit/uploaded_file_test.rb index f99edd9..305cfca 100644 --- a/test/unit/uploaded_file_test.rb +++ b/test/unit/uploaded_file_test.rb @@ -21,4 +21,15 @@ class UploadedFileTest < Test::Unit::TestCase f.expects(:content_type).returns('application/pdf') assert_equal 'application/pdf', f.mime_type end + + should 'provide proper description' do + UploadedFile.stubs(:==).with(Article).returns(true) + assert_not_equal Article.description, UploadedFile.description + end + + should 'provide proper short description' do + UploadedFile.stubs(:==).with(Article).returns(true) + assert_not_equal Article.short_description, UploadedFile.short_description + end + end -- libgit2 0.21.2