gitlab-org--gitlab-foss/spec/factories/award_emoji.rb
Bob Van Landuyt 04c7d0d555 Prevent awarding emoji when a project is archived
This prevents performing the requests, and disables all emoji reaction buttons
2018-04-11 10:51:43 +02:00

16 lines
296 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