From a3b4882665890b176a64e7a12106fb2e0c833080 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 31 Aug 2020 12:04:17 +0800 Subject: [PATCH] DEV: Leaking state in `PostActionNotifier` in tests. Follow-up to 8a0478b97d --- app/services/post_action_notifier.rb | 1 + spec/services/post_action_notifier_spec.rb | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/services/post_action_notifier.rb b/app/services/post_action_notifier.rb index 909e26321bf..7644611cbda 100644 --- a/app/services/post_action_notifier.rb +++ b/app/services/post_action_notifier.rb @@ -4,6 +4,7 @@ class PostActionNotifier def self.disable @disabled = true + @custom_post_revision_notifier_recipients = nil end def self.enable diff --git a/spec/services/post_action_notifier_spec.rb b/spec/services/post_action_notifier_spec.rb index dda44134634..746c193b7b1 100644 --- a/spec/services/post_action_notifier_spec.rb +++ b/spec/services/post_action_notifier_spec.rb @@ -108,10 +108,6 @@ describe PostActionNotifier do end end - after do - DiscoursePluginRegistry.reset! - end - it 'notifies the specified user of the revision' do expect { post.revise(evil_trout, raw: "world is the new body of the message")