Welcome to mirror list, hosted at ThFree Co, Russian Federation.

award_emoji.rb « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a8bb806381e0088b8ad66d6f3ad40989f1e3b269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

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