A platform for community discussion. Free, open, simple.
DEV: Leaking state in `PostActionNotifier` in tests.
Guo Xiang Tana3b488266589
diff --git a/app/services/post_action_notifier.rb b/app/services/post_action_notifier.rbindex 909e26321bf..7644611cbda 100644--- a/app/services/post_action_notifier.rb+++ b/app/services/post_action_notifier.rb@@ -4,6 +4,7 @@ class PostActionNotifierdef self.disable@disabled = true+ @custom_post_revision_notifier_recipients = nilenddef self.enablediff --git a/spec/services/post_action_notifier_spec.rb b/spec/services/post_action_notifier_spec.rbindex 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 doendend- after do- DiscoursePluginRegistry.reset!- end-it 'notifies the specified user of the revision' doexpect {post.revise(evil_trout, raw: "world is the new body of the message")