From adf003a9312fddfb5438775c3cf24b052c616b4f Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Thu, 28 Feb 2019 18:15:32 +0900 Subject: Fix inconsistent `branch?` behavior between Ci::Pipeline and Ci::Build Add spec Add more tests ok --- spec/factories/merge_requests.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/factories') 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' -- cgit v1.2.1