From 14d46dcb681366d46fc156312ea9138e8ff88bbb Mon Sep 17 00:00:00 2001 From: JoenioCosta Date: Tue, 29 Apr 2008 19:18:21 +0000 Subject: [PATCH] ActionItem280: add Friends block to person and fix some tests --- app/models/person.rb | 1 + test/functional/search_controller_test.rb | 2 +- test/unit/person_test.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 680d7c1..b484dc4 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -93,6 +93,7 @@ class Person < Profile # right area self.boxes[2].blocks << TagsBlock.new + self.boxes[2].blocks << FriendsBlock.new self.boxes[2].blocks << CommunitiesBlock.new self.boxes[2].blocks << EnterprisesBlock.new diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index ae5967f..3ee5770 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -451,7 +451,7 @@ class SearchControllerTest < Test::Unit::TestCase CategoryFinder.expects(:new).with(@category).returns(finger) get :category_index, :category_path => [ 'my-category' ] - assert_same recent, assigns(:results)[:recent_comments] + assert_same recent, assigns(:results)[:comments] end should 'list most commented articles in the category' do diff --git a/test/unit/person_test.rb b/test/unit/person_test.rb index eff71ea..171c18b 100644 --- a/test/unit/person_test.rb +++ b/test/unit/person_test.rb @@ -138,9 +138,9 @@ class PersonTest < Test::Unit::TestCase assert p.boxes[2].blocks.map(&:class).include?(TagsBlock), 'person must have a Tags Block upon creation' assert p.boxes[2].blocks.map(&:class).include?(CommunitiesBlock), 'person must have a CommunitiesBlock upon creation' assert p.boxes[2].blocks.map(&:class).include?(EnterprisesBlock), 'person must have a EnterprisesBlock upon creation' - # TODO check also for a "friends" block + assert p.boxes[2].blocks.map(&:class).include?(FriendsBlock), 'person must have a FriendsBlock upon creation' - assert_equal 6, p.blocks.size + assert_equal 7, p.blocks.size end should 'have friends' do -- libgit2 0.21.2