FIX: N+1 query when tagging enabled and no tags in topic list query. Topic query ignored tags input when tagging is disabled.

This commit is contained in:
Neil Lalonde
2016-05-26 18:03:36 -04:00
parent 3d5716a2c8
commit 884779b5c1
2 changed files with 15 additions and 7 deletions

View File

@ -118,6 +118,10 @@ describe TopicQuery do
let(:tag) { Fabricate(:tag) }
let(:other_tag) { Fabricate(:tag) }
before do
SiteSetting.tagging_enabled = true
end
it "returns topics with the tag when filtered to it" do
tagged_topic1 = Fabricate(:topic, {tags: [tag]})
tagged_topic2 = Fabricate(:topic, {tags: [other_tag]})