Commit 7d54eebc authored by Peter Leitzen's avatar Peter Leitzen

Fix remaining EE offenses for FactoryBot/InlineAssociation

parent e93aabe1
......@@ -44,8 +44,6 @@ Graphql/Descriptions:
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606
FactoryBot/InlineAssociation:
Exclude:
- 'ee/spec/factories/merge_request_blocks.rb'
- 'ee/spec/factories/vulnerabilities/feedback.rb'
- 'spec/factories/atlassian_identities.rb'
- 'spec/factories/events.rb'
- 'spec/factories/git_wiki_commit_details.rb'
......
......@@ -2,7 +2,7 @@
FactoryBot.define do
factory :merge_request_block do
blocking_merge_request { create(:merge_request) }
blocked_merge_request { create(:merge_request) }
blocking_merge_request { association(:merge_request) }
blocked_merge_request { association(:merge_request) }
end
end
......@@ -12,7 +12,7 @@ FactoryBot.define do
author
issue { nil }
merge_request { nil }
pipeline { create(:ci_pipeline, project: project) }
pipeline { association(:ci_pipeline, project: project) }
feedback_type { 'dismissal' }
category { 'sast' }
project_fingerprint { generate(:project_fingerprint) }
......@@ -30,12 +30,12 @@ FactoryBot.define do
trait :issue do
feedback_type { 'issue' }
issue { create(:issue, project: project) }
issue { association(:issue, project: project) }
end
trait :merge_request do
feedback_type { 'merge_request' }
merge_request { create(:merge_request, source_project: project) }
merge_request { association(:merge_request, source_project: project) }
end
trait :sast do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment