diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-17 07:09:57 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-01-18 00:02:08 +0300 |
commit | 822bf2f91c536870848df7b6f333d81fe7c89ead (patch) | |
tree | 8f8327088848b6ed08031d15ad7e6971540d01e0 /features/steps/shared | |
parent | a8b4ab9da4b8d6338ab035c24f0be3d1dea556bb (diff) |
Add the `:repository` trait to `:project` factories in Cucumber steps
Diffstat (limited to 'features/steps/shared')
-rw-r--r-- | features/steps/shared/admin.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/group.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/features/steps/shared/admin.rb b/features/steps/shared/admin.rb index fbaa408226e..ac0a1764147 100644 --- a/features/steps/shared/admin.rb +++ b/features/steps/shared/admin.rb @@ -2,7 +2,7 @@ module SharedAdmin include Spinach::DSL step 'there are projects in system' do - 2.times { create(:project) } + 2.times { create(:project, :repository) } end step 'system has users' do diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb index fe6736dacd4..de119f2c6c0 100644 --- a/features/steps/shared/group.rb +++ b/features/steps/shared/group.rb @@ -40,7 +40,7 @@ module SharedGroup 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, namespace: group, path: "project#{@project_count}") + project ||= create(:project, :repository, namespace: group, path: "project#{@project_count}") create(:closed_issue_event, project: project) project.team << [user, :master] @project_count += 1 diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index b51152c79c6..553de0345d5 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -3,19 +3,19 @@ module SharedProject # Create a project without caring about what it's called step "I own a project" do - @project = create(:project, namespace: @user.namespace) + @project = create(:project, :repository, namespace: @user.namespace) @project.team << [@user, :master] end step "project exists in some group namespace" do @group = create(:group, name: 'some group') - @project = create(:project, namespace: @group, public_builds: false) + @project = create(:project, :repository, namespace: @group, public_builds: false) end # Create a specific project called "Shop" step 'I own project "Shop"' do @project = Project.find_by(name: "Shop") - @project ||= create(:project, name: "Shop", namespace: @user.namespace) + @project ||= create(:project, :repository, name: "Shop", namespace: @user.namespace) @project.team << [@user, :master] end @@ -40,7 +40,7 @@ module SharedProject # Create another specific project called "Forum" step 'I own project "Forum"' do @project = Project.find_by(name: "Forum") - @project ||= create(:project, name: "Forum", namespace: @user.namespace, path: 'forum_project') + @project ||= create(:project, :repository, name: "Forum", namespace: @user.namespace, path: 'forum_project') @project.build_project_feature @project.project_feature.save @project.team << [@user, :master] @@ -121,7 +121,7 @@ module SharedProject # ---------------------------------------- step 'archived project "Archive"' do - create :project, :public, archived: true, name: 'Archive' + create(:project, :archived, :public, :repository, name: 'Archive') end step 'I should not see project "Archive"' do @@ -144,7 +144,7 @@ module SharedProject # ---------------------------------------- step 'private project "Enterprise"' do - create :project, name: 'Enterprise' + create(:project, :private, :repository, name: 'Enterprise') end step 'I should see project "Enterprise"' do @@ -156,7 +156,7 @@ module SharedProject end step 'internal project "Internal"' do - create :project, :internal, name: 'Internal' + create(:project, :internal, :repository, name: 'Internal') end step 'I should see project "Internal"' do @@ -168,7 +168,7 @@ module SharedProject end step 'public project "Community"' do - create :project, :public, name: 'Community' + create(:project, :public, :repository, name: 'Community') end step 'I should see project "Community"' do |