Add and apply FactoryBot/AssociationStyle rule
This rule was added in rubocop-factory_bot 2.23.0. We were following it sometimes, and sometimes we were not.
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
FactoryBot.define do
|
||||
factory :notification do
|
||||
user
|
||||
association :notifiable, factory: :proposal
|
||||
notifiable factory: :proposal
|
||||
|
||||
trait :read do
|
||||
read_at { Time.current }
|
||||
end
|
||||
|
||||
trait :for_proposal_notification do
|
||||
association :notifiable, factory: :proposal_notification
|
||||
notifiable factory: :proposal_notification
|
||||
end
|
||||
|
||||
trait :for_comment do
|
||||
association :notifiable, factory: :comment
|
||||
notifiable factory: :comment
|
||||
end
|
||||
|
||||
trait :for_poll_question do
|
||||
association :notifiable, factory: :poll_question
|
||||
notifiable factory: :poll_question
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user