4b9b2a43d0
Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji` GraphQL mutations. Adding new `#authorized_find_with_pre_checks!` and (unused, but for completeness `#authorized_find_with_post_checks!`) authorization methods. These allow us to perform an authorized find, and run our own additional checks before or after the authorization runs. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
16 lines
297 B
Ruby
16 lines
297 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
|