Commit c211161f34ed0852c2b8e642e37eefa0d92725da

Authored by AntonioTerceiro
1 parent d380dc08

ActionItem320: pointing to all people


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1712 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/people_block.rb
... ... @@ -22,4 +22,10 @@ class PeopleBlock < ProfileListBlock
22 22 end
23 23 end
24 24  
  25 + def footer
  26 + lambda do
  27 + link_to _('All people'), :controller => 'search', :action => 'assets', :asset => 'people'
  28 + end
  29 + end
  30 +
25 31 end
... ...
test/unit/people_block_test.rb
... ... @@ -32,4 +32,13 @@ class PeopleBlockTest < ActiveSupport::TestCase
32 32 block.content
33 33 end
34 34  
  35 + should 'link to people directory' do
  36 + block = PeopleBlock.new
  37 + block.stubs(:owner).returns(Environment.default)
  38 +
  39 + expects(:link_to).with('All people', :controller => 'search', :action => 'assets', :asset => 'people')
  40 + expects(:_).with('All people').returns('All people')
  41 + instance_eval(&block.footer)
  42 + end
  43 +
35 44 end
... ...