debian-mirror-gitlab/spec/factories/award_emoji.rb
2019-09-30 21:07:59 +05:30

16 lines
297 B
Ruby

FactoryBot.define do
factory :award_emoji do
name "thumbsup"
user
awardable factory: :issue
after(:create) do |award, evaluator|
award.awardable.project&.add_guest(evaluator.user)
end
trait :upvote
trait :downvote do
name "thumbsdown"
end
end
end