diff --git a/spec/lib/topic_query_spec.rb b/spec/lib/topic_query_spec.rb index e3f399ce467..e1259fe8def 100644 --- a/spec/lib/topic_query_spec.rb +++ b/spec/lib/topic_query_spec.rb @@ -1366,12 +1366,12 @@ RSpec.describe TopicQuery do end describe "#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" do let(:topic) { Fabricate(:topic) } let!(:new_topic) { Fabricate(:post, user: creator).topic }