A platform for community discussion. Free, open, simple.
DEV: Fix group of tests that is leaking state (#23141)
Alan Guo Xiang Tan7c8e978b5434
diff --git a/spec/lib/topic_query_spec.rb b/spec/lib/topic_query_spec.rbindex e3f399ce467..e1259fe8def 100644--- a/spec/lib/topic_query_spec.rb+++ b/spec/lib/topic_query_spec.rb@@ -1366,12 +1366,12 @@ RSpec.describe TopicQuery doenddescribe "#list_suggested_for" do+ use_redis_snapshotting+def clear_cache!Discourse.redis.keys("random_topic_cache*").each { |k| Discourse.redis.del k }end- before { clear_cache! }-context "when anonymous" dolet(:topic) { Fabricate(:topic) }let!(:new_topic) { Fabricate(:post, user: creator).topic }