Commit dfe481cc4f27e377441bfa3878872fe54d378026

Authored by AntonioTerceiro
1 parent 43cf6161

ActionItem154: adding communities block to person


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1397 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/person.rb
... ... @@ -74,6 +74,7 @@ class Person < Profile
74 74  
75 75 # right area
76 76 self.boxes[2].blocks << TagsBlock.new
  77 + self.boxes[2].blocks << CommunitiesBlock.new
77 78  
78 79 true
79 80 end
... ...
test/unit/person_test.rb
... ... @@ -136,9 +136,10 @@ class PersonTest &lt; Test::Unit::TestCase
136 136 assert p.boxes[1].blocks.map(&:class).include?(RecentDocumentsBlock), 'person must have a RecentDocumentsBlock upon creation'
137 137  
138 138 assert p.boxes[2].blocks.map(&:class).include?(TagsBlock), 'person must have a Tags Block upon creation'
  139 + assert p.boxes[2].blocks.map(&:class).include?(CommunitiesBlock), 'person must have a CommunitiesBlock upon creation'
139 140 # TODO check also for a "friends" block
140 141  
141   - assert_equal 4, p.blocks.size
  142 + assert_equal 5, p.blocks.size
142 143 end
143 144  
144 145 end
... ...