debian-mirror-gitlab/spec/factories/award_emoji.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
336 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
factory :award_emoji do
2019-12-21 20:55:43 +05:30
name { "thumbsup" }
user
awardable factory: :issue
2018-05-09 12:01:36 +05:30
after(:create) do |award, evaluator|
2019-09-30 21:07:59 +05:30
award.awardable.project&.add_guest(evaluator.user)
2018-05-09 12:01:36 +05:30
end
trait :upvote
trait :downvote do
2019-12-21 20:55:43 +05:30
name { "thumbsdown" }
end
end
end