Commit 561a6e47 authored by Peter Leitzen's avatar Peter Leitzen

Fix cop FactoryBot/InlineAssociation for EE resource events

parent 403362ba
......@@ -1265,8 +1265,6 @@ FactoryBot/InlineAssociation:
- 'ee/spec/factories/geo/event_log.rb'
- 'ee/spec/factories/groups.rb'
- 'ee/spec/factories/merge_request_blocks.rb'
- 'ee/spec/factories/resource_iteration_event.rb'
- 'ee/spec/factories/resource_weight_events.rb'
- 'ee/spec/factories/vulnerabilities/feedback.rb'
- 'spec/factories/atlassian_identities.rb'
- 'spec/factories/design_management/design_at_version.rb'
......
......@@ -2,10 +2,10 @@
FactoryBot.define do
factory :resource_iteration_event do
issue { merge_request.nil? ? create(:issue) : nil }
issue { merge_request.nil? ? association(:issue) : nil }
merge_request { nil }
iteration
action { :add }
user { issue&.author || merge_request&.author || create(:user) }
user { issue&.author || merge_request&.author || association(:user) }
end
end
......@@ -2,7 +2,7 @@
FactoryBot.define do
factory :resource_weight_event do
issue { create(:issue) }
user { issue&.author || create(:user) }
issue { association(:issue) }
user { issue&.author || association(:user) }
end
end
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