discourse-topic-voting/spec/fabricators/topic_voting_hook_fabricator.rb
Krzysztof Kotlarek aa12f754d4
FIX: granular webhooks (#159)
After those core changes we need additional translations and separate logic to handle assigned and unassigned webhooks

https://github.com/discourse/discourse/pull/23070
2023-10-09 03:26:19 +00:00

7 lines
220 B
Ruby

# frozen_string_literal: true
Fabricator(:topic_voting_web_hook, from: :web_hook) do
after_build do |web_hook|
web_hook.web_hook_event_types = WebHookEventType.where(name: %w[topic_upvote topic_unvote])
end
end