2019-07-25 01:11:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-13 19:13:44 -05:00
|
|
|
FactoryBot.define do
|
2016-04-16 15:09:08 -04:00
|
|
|
factory :award_emoji do
|
|
|
|
name "thumbsup"
|
|
|
|
user
|
|
|
|
awardable factory: :issue
|
2016-04-25 14:10:20 -04:00
|
|
|
|
2018-04-06 14:19:37 -04:00
|
|
|
after(:create) do |award, evaluator|
|
2019-06-21 00:45:27 -04:00
|
|
|
award.awardable.project&.add_guest(evaluator.user)
|
2018-04-06 14:19:37 -04:00
|
|
|
end
|
|
|
|
|
2016-04-25 14:10:20 -04:00
|
|
|
trait :upvote
|
|
|
|
trait :downvote do
|
|
|
|
name "thumbsdown"
|
|
|
|
end
|
2016-04-16 15:09:08 -04:00
|
|
|
end
|
|
|
|
end
|