From 31c7694397b06a5d87b279308f9287ba39a9c7f5 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 3 Oct 2008 16:10:46 -0300 Subject: [PATCH] ActionItem720: fixing tests --- test/functional/profile_controller_test.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index 482d48f..6bc112b 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -67,7 +67,7 @@ class ProfileControllerTest < Test::Unit::TestCase login_as(@profile.identifier) community = Community.create!(:name => 'my test community') get :index, :profile => community.identifier - assert_tag :tag => 'a', :content => 'Join this community' + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/join/#{community.id}" } end should 'not show Join This Community button for member users' do @@ -75,13 +75,15 @@ class ProfileControllerTest < Test::Unit::TestCase community = Community.create!(:name => 'my test community') community.add_member(@profile) get :index, :profile => community.identifier - assert_no_tag :tag => 'a', :content => 'Join this community' + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/join/#{community.id}" } + end should 'not show Join This Community button for non-registered users' do community = Community.create!(:name => 'my test community') get :index, :profile => community.identifier - assert_no_tag :tag => 'a', :content => 'Join this community' + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } + end should 'not show enterprises link to enterprise' do @@ -190,7 +192,7 @@ class ProfileControllerTest < Test::Unit::TestCase login_as(@profile.identifier) community = Community.create!(:name => 'my test community') get :index, :profile => community.identifier - assert_no_tag :tag => 'a', :content => 'Leave this community' + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } end should 'show Leave This Community button for member users' do @@ -198,13 +200,13 @@ class ProfileControllerTest < Test::Unit::TestCase community = Community.create!(:name => 'my test community') community.add_member(@profile) get :index, :profile => community.identifier - assert_tag :tag => 'a', :content => 'Leave this community' + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } end should 'not show Leave This Community button for non-registered users' do community = Community.create!(:name => 'my test community') get :index, :profile => community.identifier - assert_no_tag :tag => 'a', :content => 'Leave this community' + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } end should 'check access before displaying profile' do -- libgit2 0.21.2