Remove team_member show page -> use user_path instead

This commit is contained in:
Dmitriy Zaporozhets 2013-03-13 19:16:36 +02:00
parent 366bc32013
commit fa9a8c3847
13 changed files with 34 additions and 178 deletions

View file

@ -5,13 +5,13 @@ class ProjectTeamManagement < Spinach::FeatureSteps
Then 'I should be able to see myself in team' do
page.should have_content(@user.name)
page.should have_content(@user.email)
page.should have_content(@user.username)
end
And 'I should see "Sam" in team list' do
user = User.find_by_name("Sam")
page.should have_content(user.name)
page.should have_content(user.email)
page.should have_content(user.username)
end
Given 'I click link "New Team Member"' do
@ -52,17 +52,6 @@ class ProjectTeamManagement < Spinach::FeatureSteps
role_id.should == UsersProject.access_roles["Reporter"].to_s
end
Given 'I click link "Sam"' do
first(:link, "Sam").click
end
Then 'I should see "Sam" team profile' do
user = User.find_by_name("Sam")
page.should have_content(user.name)
page.should have_content(user.email)
page.should have_content("To team list")
end
And 'I click link "Remove from team"' do
click_link "Remove from team"
end
@ -70,7 +59,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps
And 'I should not see "Sam" in team list' do
user = User.find_by_name("Sam")
page.should_not have_content(user.name)
page.should_not have_content(user.email)
page.should_not have_content(user.username)
end
And 'gitlab user "Mike"' do
@ -106,4 +95,10 @@ class ProjectTeamManagement < Spinach::FeatureSteps
select 'Website', from: 'source_project_id'
click_button 'Import'
end
step 'I click cancel link for "Sam"' do
within "#user_#{User.find_by_name('Sam').id}" do
click_link('Remove user from team')
end
end
end