diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-08-31 10:03:12 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-08-31 10:03:12 +0300 |
commit | eacda4cc98933c2c9bfd4935b289eee79da516dd (patch) | |
tree | c3f42466af59edd6f6ff0da7b8334e75112221a2 /features/steps | |
parent | f7c8434c7100c3c87eb2a75cd5a128e520d8c110 (diff) | |
parent | a882026bdfc770ecfac70bfc88a409ec010f06c9 (diff) |
Merge branch '36743-existing-repo-master' into 'master'
[master] Prevent project creation (blank, import or fork) when repository already exists on disk
See merge request gitlab/gitlabhq!2169
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/shared/group.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb index de119f2c6c0..03bc7e798e0 100644 --- a/features/steps/shared/group.rb +++ b/features/steps/shared/group.rb @@ -36,14 +36,12 @@ module SharedGroup protected def is_member_of(username, groupname, role) - @project_count ||= 0 user = User.find_by(name: username) || create(:user, name: username) group = Group.find_by(name: groupname) || create(:group, name: groupname) group.add_user(user, role) - project ||= create(:project, :repository, namespace: group, path: "project#{@project_count}") + project ||= create(:project, :repository, namespace: group) create(:closed_issue_event, project: project) project.team << [user, :master] - @project_count += 1 end def owned_group |