It totally slipped my mind that we can create negative reactions on comments. This PR accounts for that in the internal view that renders negative reactions.
37 lines
781 B
Ruby
37 lines
781 B
Ruby
FactoryBot.define do
|
|
factory :reaction do
|
|
user
|
|
association :reactable, factory: :article
|
|
category { "like" }
|
|
end
|
|
|
|
factory :reading_reaction, class: "Reaction" do
|
|
user
|
|
association :reactable, factory: :article
|
|
category { "readinglist" }
|
|
end
|
|
|
|
factory :thumbsdown_reaction, class: "Reaction" do
|
|
user
|
|
association :reactable, factory: :article
|
|
category { "thumbsdown" }
|
|
|
|
trait :user do
|
|
association :reactable, factory: :user
|
|
end
|
|
end
|
|
|
|
factory :vomit_reaction, class: "Reaction" do
|
|
user
|
|
association :reactable, factory: :article
|
|
category { "vomit" }
|
|
|
|
trait :user do
|
|
association :reactable, factory: :user
|
|
end
|
|
|
|
trait :comment do
|
|
association :reactable, factory: :comment
|
|
end
|
|
end
|
|
end
|