Commit 92346b7362d9c9f4c62b24f2b6be9efb6e271d7d
1 parent
e931f2b9
Exists in
master
and in
29 other branches
ActionItem158: creating and displaying folders
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1787 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
15 additions
and
1 deletions
Show diff stats
app/models/folder.rb
@@ -5,7 +5,11 @@ class Folder < Article | @@ -5,7 +5,11 @@ class Folder < Article | ||
5 | end | 5 | end |
6 | 6 | ||
7 | def self.description | 7 | def self.description |
8 | - _('A folder, inside which you can put other articles') | 8 | + _('A folder, inside which you can put other articles.') |
9 | + end | ||
10 | + | ||
11 | + def icon_name | ||
12 | + 'folder' | ||
9 | end | 13 | end |
10 | 14 | ||
11 | # FIXME we should not need all this just to write a link | 15 | # FIXME we should not need all this just to write a link |
1 KB
test/unit/folder_test.rb
@@ -16,6 +16,10 @@ class FolderTest < ActiveSupport::TestCase | @@ -16,6 +16,10 @@ class FolderTest < ActiveSupport::TestCase | ||
16 | assert_not_equal Article.short_description, Folder.short_description | 16 | assert_not_equal Article.short_description, Folder.short_description |
17 | end | 17 | end |
18 | 18 | ||
19 | + should 'provide own icon name' do | ||
20 | + assert_not_equal Article.new.icon_name, Folder.new.icon_name | ||
21 | + end | ||
22 | + | ||
19 | should 'list subitems as HTML content' do | 23 | should 'list subitems as HTML content' do |
20 | p = create_user('testuser').person | 24 | p = create_user('testuser').person |
21 | f = Folder.create!(:profile => p, :name => 'f') | 25 | f = Folder.create!(:profile => p, :name => 'f') |