discourse-solved/spec/fabricators/solved_hook_fabricator.rb

9 lines
232 B
Ruby

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