summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-25 10:24:08 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-25 10:24:29 +0100
commit561634c78f3ab7967709196e8cca39a256d27196 (patch)
treed6b8d2e089267740090f781b4f4404158a609b44 /features
parentea7467d2be0e367ed1ec6df656cab059a9db6da0 (diff)
downloadgitlab-ce-561634c78f3ab7967709196e8cca39a256d27196.tar.gz
Refactor group steps
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/steps/groups.rb77
1 files changed, 16 insertions, 61 deletions
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 5de54d9b1ee..d99417d178e 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -332,67 +332,22 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
def group_milestone
group = owned_group
- @project1 = create :project,
- group: group
- project2 = create :project,
- path: 'gitlab-ci',
- group: group
- @project3 = create :project,
- path: 'cookbook-gitlab',
- group: group
- milestone1_project1 = create :milestone,
- title: "Version 7.2",
- project: @project1
- milestone1_project2 = create :milestone,
- title: "Version 7.2",
- project: project2
- create :milestone,
- title: "Version 7.2",
- project: @project3
- milestone2_project1 = create :milestone,
- title: "GL-113",
- project: @project1
- milestone2_project2 = create :milestone,
- title: "GL-113",
- project: project2
- milestone2_project3 = create :milestone,
- title: "GL-113",
- project: @project3,
- due_date: '2114-08-20',
- description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry'
- @issue1 = create :issue,
- project: @project1,
- assignee: current_user,
- author: current_user,
- milestone: milestone2_project1
- create :issue,
- project: project2,
- assignee: current_user,
- author: current_user,
- milestone: milestone1_project2
- create :issue,
- project: @project3,
- assignee: current_user,
- author: current_user,
- milestone: milestone1_project1
- create :merge_request,
- source_project: @project1,
- target_project: @project1,
- assignee: current_user,
- author: current_user,
- milestone: milestone2_project1
- create :merge_request,
- source_project: project2,
- target_project: project2,
- assignee: current_user,
- author: current_user,
- milestone: milestone2_project2
- @mr3 = create :merge_request,
- source_project: @project3,
- target_project: @project3,
- assignee: current_user,
- author: current_user,
- milestone: milestone2_project3
+ %w(gitlabhq gitlab-ci cookbook-gitlab).each do |path|
+ project = create :project, path: path, group: group
+ milestone = create :milestone, title: "Version 7.2", project: project
+ create :issue,
+ project: project,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone
+
+ milestone = create :milestone, title: "GL-113", project: project
+ create :issue,
+ project: project,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone
+ end
end
def group_members_list