diff --git a/app/models/people_block.rb b/app/models/people_block.rb index b46daf7..b2e37cf 100644 --- a/app/models/people_block.rb +++ b/app/models/people_block.rb @@ -22,4 +22,10 @@ class PeopleBlock < ProfileListBlock end end + def footer + lambda do + link_to _('All people'), :controller => 'search', :action => 'assets', :asset => 'people' + end + end + end diff --git a/test/unit/people_block_test.rb b/test/unit/people_block_test.rb index 88eba98..f331c6f 100644 --- a/test/unit/people_block_test.rb +++ b/test/unit/people_block_test.rb @@ -32,4 +32,13 @@ class PeopleBlockTest < ActiveSupport::TestCase block.content end + should 'link to people directory' do + block = PeopleBlock.new + block.stubs(:owner).returns(Environment.default) + + expects(:link_to).with('All people', :controller => 'search', :action => 'assets', :asset => 'people') + expects(:_).with('All people').returns('All people') + instance_eval(&block.footer) + end + end -- libgit2 0.21.2