diff --git a/spec/fabricators/topic_voting_hook_fabricator.rb b/spec/fabricators/topic_voting_hook_fabricator.rb index 3559c36..879bc5f 100644 --- a/spec/fabricators/topic_voting_hook_fabricator.rb +++ b/spec/fabricators/topic_voting_hook_fabricator.rb @@ -1,9 +1,7 @@ # frozen_string_literal: true Fabricator(:topic_voting_web_hook, from: :web_hook) do - transient topic_voting_hook: WebHookEventType.find_by(name: "topic_upvote") - - after_build do |web_hook, transients| - web_hook.web_hook_event_types = [transients[:topic_voting_hook]] + after_build do |web_hook| + web_hook.web_hook_event_types = WebHookEventType.where(name: %w[topic_upvote topic_unvote]) end end