diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-09 16:48:03 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-13 10:52:50 +0100 |
commit | 6384c757b7ce6d1c0c3e2a3828b0cfac26dfb7f9 (patch) | |
tree | 8d6b5db2f275eb8ebb28f9ebd2beb2b492bb357e /spec/factories | |
parent | 37465f44b40df9709507fda7a022f1907b23d53f (diff) | |
download | gitlab-ce-6384c757b7ce6d1c0c3e2a3828b0cfac26dfb7f9.tar.gz |
Expose CI enable option in project features
- Enable CI by default for all new projects
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/ci/projects.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/factories/ci/projects.rb b/spec/factories/ci/projects.rb index 1183a190353..11cb8c9eeaa 100644 --- a/spec/factories/ci/projects.rb +++ b/spec/factories/ci/projects.rb @@ -31,16 +31,20 @@ FactoryGirl.define do factory :ci_project_without_token, class: Ci::Project do default_ref 'master' - gl_project factory: :empty_project - shared_runners_enabled false factory :ci_project do token 'iPWx6WM4lhHNedGfBpPJNP' end - factory :ci_public_project do - public true + initialize_with do + # TODO: + # this is required, because builds_enabled is initialized when Project is created + # and this create gitlab_ci_project if builds is set to true + # here we take created gitlab_ci_project and update it's attributes + ci_project = create(:empty_project).ensure_gitlab_ci_project + ci_project.update_attributes(attributes) + ci_project end end end |