summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-04 17:05:16 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-05-04 17:05:16 -0400
commitf18ec70743375024aa7ec7bb86c437ca9198e729 (patch)
tree4fe1fb68fbb9ced4ff5f5514f755916554d2d384 /spec/factories
parentfad7b392dc633fb689e657af8b7fad346ede416e (diff)
downloadgitlab-ce-f18ec70743375024aa7ec7bb86c437ca9198e729.tar.gz
Backport changes from gitlab-org/gitlab-ee!372rs-backport-ee-372
Mostly replaces several Spinach tests with RSpec Feature tests.
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/projects.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index c14b99606ba..5338c88dd84 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -61,6 +61,12 @@ FactoryGirl.define do
trait :private do
visibility_level Gitlab::VisibilityLevel::PRIVATE
end
+
+ trait :empty_repo do
+ after(:create) do |project|
+ project.create_repository
+ end
+ end
end
# Project with empty repository
@@ -68,9 +74,7 @@ FactoryGirl.define do
# This is a case when you just created a project
# but not pushed any code there yet
factory :project_empty_repo, parent: :empty_project do
- after :create do |project|
- project.create_repository
- end
+ empty_repo
end
# Project with test repository