From b9dfb0ba10cd6b5e66f3a26c138ba61e4223f062 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 18 May 2018 15:01:36 +0800 Subject: [PATCH] Partially revert https://github.com/discourse/discourse/commit/531baec5b585a7a82365a5733e8be5298fa1019d. --- spec/fabricators/web_hook_fabricator.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/fabricators/web_hook_fabricator.rb b/spec/fabricators/web_hook_fabricator.rb index 9f9ac23a942..c7632cd2d07 100644 --- a/spec/fabricators/web_hook_fabricator.rb +++ b/spec/fabricators/web_hook_fabricator.rb @@ -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')