discourse-assign/spec/fabricators/assign_hook_fabricator.rb

10 lines
260 B
Ruby

# frozen_string_literal: true
Fabricator(:assign_web_hook, from: :web_hook) do
transient assign_hook: WebHookEventType.find_by(name: 'assign')
after_build do |web_hook, transients|
web_hook.web_hook_event_types = [transients[:assign_hook]]
end
end