summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-03-01 09:41:04 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-03-01 09:41:04 +0000
commitdc5fc28382246fbbe2bb6f61fe8dac136b5f3189 (patch)
treee654aad0e19527865009380a6a5e3de81b36f71d /spec/factories
parentd860ab195afbf11118564e6399cd59a8bbd9d622 (diff)
parentadf003a9312fddfb5438775c3cf24b052c616b4f (diff)
downloadgitlab-ce-dc5fc28382246fbbe2bb6f61fe8dac136b5f3189.tar.gz
Merge branch 'fix-inconsistent-behavior-of-has-ref' into 'master'
Fix inconsistent `branch?` behavior between Ci::Pipeline and Ci::Build See merge request gitlab-org/gitlab-ce!25629
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/merge_requests.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index 2392bfc4a53..0c0c5fc8a4c 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -101,6 +101,15 @@ FactoryBot.define do
end
end
+ trait :with_merge_request_pipeline do
+ after(:build) do |merge_request|
+ merge_request.merge_request_pipelines << build(:ci_pipeline,
+ source: :merge_request,
+ merge_request: merge_request,
+ project: merge_request.source_project)
+ end
+ end
+
trait :deployed_review_app do
target_branch 'pages-deploy-target'