Commit 31c7694397b06a5d87b279308f9287ba39a9c7f5
1 parent
992cf6bb
Exists in
master
and in
28 other branches
ActionItem720: fixing tests
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
test/functional/profile_controller_test.rb
| ... | ... | @@ -67,7 +67,7 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 67 | 67 | login_as(@profile.identifier) |
| 68 | 68 | community = Community.create!(:name => 'my test community') |
| 69 | 69 | get :index, :profile => community.identifier |
| 70 | - assert_tag :tag => 'a', :content => 'Join this community' | |
| 70 | + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/join/#{community.id}" } | |
| 71 | 71 | end |
| 72 | 72 | |
| 73 | 73 | should 'not show Join This Community button for member users' do |
| ... | ... | @@ -75,13 +75,15 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 75 | 75 | community = Community.create!(:name => 'my test community') |
| 76 | 76 | community.add_member(@profile) |
| 77 | 77 | get :index, :profile => community.identifier |
| 78 | - assert_no_tag :tag => 'a', :content => 'Join this community' | |
| 78 | + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/join/#{community.id}" } | |
| 79 | + | |
| 79 | 80 | end |
| 80 | 81 | |
| 81 | 82 | should 'not show Join This Community button for non-registered users' do |
| 82 | 83 | community = Community.create!(:name => 'my test community') |
| 83 | 84 | get :index, :profile => community.identifier |
| 84 | - assert_no_tag :tag => 'a', :content => 'Join this community' | |
| 85 | + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } | |
| 86 | + | |
| 85 | 87 | end |
| 86 | 88 | |
| 87 | 89 | should 'not show enterprises link to enterprise' do |
| ... | ... | @@ -190,7 +192,7 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 190 | 192 | login_as(@profile.identifier) |
| 191 | 193 | community = Community.create!(:name => 'my test community') |
| 192 | 194 | get :index, :profile => community.identifier |
| 193 | - assert_no_tag :tag => 'a', :content => 'Leave this community' | |
| 195 | + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } | |
| 194 | 196 | end |
| 195 | 197 | |
| 196 | 198 | should 'show Leave This Community button for member users' do |
| ... | ... | @@ -198,13 +200,13 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 198 | 200 | community = Community.create!(:name => 'my test community') |
| 199 | 201 | community.add_member(@profile) |
| 200 | 202 | get :index, :profile => community.identifier |
| 201 | - assert_tag :tag => 'a', :content => 'Leave this community' | |
| 203 | + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } | |
| 202 | 204 | end |
| 203 | 205 | |
| 204 | 206 | should 'not show Leave This Community button for non-registered users' do |
| 205 | 207 | community = Community.create!(:name => 'my test community') |
| 206 | 208 | get :index, :profile => community.identifier |
| 207 | - assert_no_tag :tag => 'a', :content => 'Leave this community' | |
| 209 | + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{@profile.identifier}/memberships/leave/#{community.id}" } | |
| 208 | 210 | end |
| 209 | 211 | |
| 210 | 212 | should 'check access before displaying profile' do | ... | ... |