Partially revert 531baec5b5.

This commit is contained in:
Guo Xiang Tan 2018-05-18 15:01:36 +08:00
parent 1ff767559d
commit b9dfb0ba10
1 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,14 @@ Fabricator(:topic_web_hook, from: :web_hook) do
end
end
Fabricator(:post_web_hook, from: :web_hook) do
transient topic_hook: WebHookEventType.find_by(name: 'post')
after_build do |web_hook, transients|
web_hook.web_hook_event_types = [transients[:post_hook]]
end
end
Fabricator(:user_web_hook, from: :web_hook) do
transient user_hook: WebHookEventType.find_by(name: 'user')