From c211161f34ed0852c2b8e642e37eefa0d92725da Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Mon, 28 Apr 2008 13:09:18 +0000 Subject: [PATCH] ActionItem320: pointing to all people --- app/models/people_block.rb | 6 ++++++ test/unit/people_block_test.rb | 9 +++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) 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