Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ci/pipelines.rb')
-rw-r--r--spec/factories/ci/pipelines.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index d68562c0aa5..2b6bddd2f6d 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -21,6 +21,12 @@ FactoryBot.define do
transient { name { nil } }
+ transient { ci_ref_presence { true } }
+
+ before(:create) do |pipeline, evaluator|
+ pipeline.ensure_ci_ref! if evaluator.ci_ref_presence && pipeline.ci_ref_id.nil?
+ end
+
after(:build) do |pipeline, evaluator|
if evaluator.child_of
pipeline.project = evaluator.child_of.project
@@ -54,12 +60,6 @@ FactoryBot.define do
end
factory :ci_pipeline do
- transient { ci_ref_presence { true } }
-
- before(:create) do |pipeline, evaluator|
- pipeline.ensure_ci_ref! if evaluator.ci_ref_presence && pipeline.ci_ref_id.nil?
- end
-
trait :invalid do
status { :failed }
yaml_errors { 'invalid YAML' }