mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
try to work around caching bug in spec
This commit is contained in:
@ -432,12 +432,13 @@ describe TopicQuery do
|
|||||||
|
|
||||||
context 'when logged in' do
|
context 'when logged in' do
|
||||||
|
|
||||||
before do
|
|
||||||
RandomTopicSelector.clear_cache!
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:topic) { Fabricate(:topic) }
|
let(:topic) { Fabricate(:topic) }
|
||||||
let(:suggested_topics) { topic_query.list_suggested_for(topic).topics.map{|t| t.id} }
|
let(:suggested_topics) {
|
||||||
|
tt = topic
|
||||||
|
# lets clear cache once category is created - working around caching is hard
|
||||||
|
RandomTopicSelector.clear_cache!
|
||||||
|
topic_query.list_suggested_for(tt).topics.map{|t| t.id}
|
||||||
|
}
|
||||||
|
|
||||||
it "should return empty results when there is nothing to find" do
|
it "should return empty results when there is nothing to find" do
|
||||||
expect(suggested_topics).to be_blank
|
expect(suggested_topics).to be_blank
|
||||||
|
Reference in New Issue
Block a user