Commit 03918d95 authored by a_luna's avatar a_luna

Fix cop FactoryBot/InlineAssociation for audit_events

parent 16085950
...@@ -1279,7 +1279,6 @@ FactoryBot/InlineAssociation: ...@@ -1279,7 +1279,6 @@ FactoryBot/InlineAssociation:
- 'ee/spec/factories/resource_weight_events.rb' - 'ee/spec/factories/resource_weight_events.rb'
- 'ee/spec/factories/vulnerabilities/feedback.rb' - 'ee/spec/factories/vulnerabilities/feedback.rb'
- 'spec/factories/atlassian_identities.rb' - 'spec/factories/atlassian_identities.rb'
- 'spec/factories/audit_events.rb'
- 'spec/factories/design_management/design_at_version.rb' - 'spec/factories/design_management/design_at_version.rb'
- 'spec/factories/design_management/designs.rb' - 'spec/factories/design_management/designs.rb'
- 'spec/factories/design_management/versions.rb' - 'spec/factories/design_management/versions.rb'
......
...@@ -4,7 +4,7 @@ FactoryBot.define do ...@@ -4,7 +4,7 @@ FactoryBot.define do
factory :audit_event, class: 'AuditEvent', aliases: [:user_audit_event] do factory :audit_event, class: 'AuditEvent', aliases: [:user_audit_event] do
user user
transient { target_user { create(:user) } } transient { target_user { association(:user) } }
entity_type { 'User' } entity_type { 'User' }
entity_id { target_user.id } entity_id { target_user.id }
...@@ -27,7 +27,7 @@ FactoryBot.define do ...@@ -27,7 +27,7 @@ FactoryBot.define do
end end
trait :project_event do trait :project_event do
transient { target_project { create(:project) } } transient { target_project { association(:project) } }
entity_type { 'Project' } entity_type { 'Project' }
entity_id { target_project.id } entity_id { target_project.id }
...@@ -50,7 +50,7 @@ FactoryBot.define do ...@@ -50,7 +50,7 @@ FactoryBot.define do
end end
trait :group_event do trait :group_event do
transient { target_group { create(:group) } } transient { target_group { association(:group) } }
entity_type { 'Group' } entity_type { 'Group' }
entity_id { target_group.id } entity_id { target_group.id }
......
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