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: ...@@ -44,8 +44,6 @@ Graphql/Descriptions:
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606 # WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606
FactoryBot/InlineAssociation: FactoryBot/InlineAssociation:
Exclude: Exclude:
- 'ee/spec/factories/merge_request_blocks.rb'
- 'ee/spec/factories/vulnerabilities/feedback.rb'
- 'spec/factories/atlassian_identities.rb' - 'spec/factories/atlassian_identities.rb'
- 'spec/factories/events.rb' - 'spec/factories/events.rb'
- 'spec/factories/git_wiki_commit_details.rb' - 'spec/factories/git_wiki_commit_details.rb'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FactoryBot.define do FactoryBot.define do
factory :merge_request_block do factory :merge_request_block do
blocking_merge_request { create(:merge_request) } blocking_merge_request { association(:merge_request) }
blocked_merge_request { create(:merge_request) } blocked_merge_request { association(:merge_request) }
end end
end end
...@@ -12,7 +12,7 @@ FactoryBot.define do ...@@ -12,7 +12,7 @@ FactoryBot.define do
author author
issue { nil } issue { nil }
merge_request { nil } merge_request { nil }
pipeline { create(:ci_pipeline, project: project) } pipeline { association(:ci_pipeline, project: project) }
feedback_type { 'dismissal' } feedback_type { 'dismissal' }
category { 'sast' } category { 'sast' }
project_fingerprint { generate(:project_fingerprint) } project_fingerprint { generate(:project_fingerprint) }
...@@ -30,12 +30,12 @@ FactoryBot.define do ...@@ -30,12 +30,12 @@ FactoryBot.define do
trait :issue do trait :issue do
feedback_type { 'issue' } feedback_type { 'issue' }
issue { create(:issue, project: project) } issue { association(:issue, project: project) }
end end
trait :merge_request do trait :merge_request do
feedback_type { 'merge_request' } feedback_type { 'merge_request' }
merge_request { create(:merge_request, source_project: project) } merge_request { association(:merge_request, source_project: project) }
end end
trait :sast do 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