diff options
Diffstat (limited to 'spec/factories/merge_requests.rb')
-rw-r--r-- | spec/factories/merge_requests.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb index f722bb9cb0d..cbc0b943396 100644 --- a/spec/factories/merge_requests.rb +++ b/spec/factories/merge_requests.rb @@ -89,6 +89,18 @@ FactoryBot.define do end end + trait :with_test_reports do + after(:build) do |merge_request| + merge_request.head_pipeline = build( + :ci_pipeline, + :success, + :with_test_reports, + project: merge_request.source_project, + ref: merge_request.source_branch, + sha: merge_request.diff_head_sha) + end + end + after(:build) do |merge_request| target_project = merge_request.target_project source_project = merge_request.source_project |