try to work around caching bug in spec

This commit is contained in:
Sam 2015-03-05 17:47:34 +11:00
parent bf8fd0815f
commit a26853c1a4
1 changed files with 6 additions and 5 deletions

View File

@ -432,12 +432,13 @@ describe TopicQuery do
context 'when logged in' do
before do
RandomTopicSelector.clear_cache!
end
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
expect(suggested_topics).to be_blank