diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-05-04 17:05:16 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-05-04 17:05:16 -0400 |
commit | f18ec70743375024aa7ec7bb86c437ca9198e729 (patch) | |
tree | 4fe1fb68fbb9ced4ff5f5514f755916554d2d384 /spec/factories | |
parent | fad7b392dc633fb689e657af8b7fad346ede416e (diff) | |
download | gitlab-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.rb | 10 |
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 |