gitlab-org--gitlab-foss/spec/factories/award_emoji.rb

19 lines
336 B
Ruby
Raw Normal View History

# frozen_string_literal: true
FactoryBot.define do
2016-04-16 15:09:08 -04:00
factory :award_emoji do
name { "thumbsup" }
2016-04-16 15:09:08 -04:00
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
2016-04-16 15:09:08 -04:00
end
end