diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-24 15:23:04 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-24 15:23:04 +0300 |
commit | 6f4576b7436ff4573b28ab8305796e96bb2aed29 (patch) | |
tree | 703eab09e57f338cdca8cfcc9124eff0f7978ebf /features | |
parent | b7a9e41bd269e2b5519928c35592aad96d3707c6 (diff) | |
download | gitlab-ce-6f4576b7436ff4573b28ab8305796e96bb2aed29.tar.gz |
Spinach feature
Diffstat (limited to 'features')
-rw-r--r-- | features/project/team_management.feature | 7 | ||||
-rw-r--r-- | features/steps/project/project_team_management.rb | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/features/project/team_management.feature b/features/project/team_management.feature index ae0c459f333..0ac37620b4e 100644 --- a/features/project/team_management.feature +++ b/features/project/team_management.feature @@ -32,3 +32,10 @@ Feature: Project Team management And I click link "Remove from team" Then I visit project "Shop" team page And I should not see "Sam" in team list + + Scenario: Import team from another project + Given I own project "Website" + And "Mike" is "Website" reporter + And I click link "Import team from another project" + When I submit "Website" project for import team + Then I should see "Mike" in team list as "Reporter" diff --git a/features/steps/project/project_team_management.rb b/features/steps/project/project_team_management.rb index 7beca257e36..5c3a9b31129 100644 --- a/features/steps/project/project_team_management.rb +++ b/features/steps/project/project_team_management.rb @@ -86,4 +86,24 @@ class ProjectTeamManagement < Spinach::FeatureSteps project = Project.find_by_name("Shop") project.add_access(user, :write) end + + Given 'I own project "Website"' do + @project = Factory :project, :name => "Website" + @project.add_access(@user, :admin) + end + + And '"Mike" is "Website" reporter' do + user = User.find_by_name("Mike") + project = Project.find_by_name("Website") + project.add_access(user, :read) + end + + And 'I click link "Import team from another project"' do + click_link "Import team from another project" + end + + When 'I submit "Website" project for import team' do + select 'Website', from: 'source_project_id' + click_button 'Import' + end end |