FEATURE: tag filter dropdown menu is scoped to user and category

This commit is contained in:
Neil Lalonde
2016-09-22 15:23:10 -04:00
parent 3d621767cc
commit e0be2f482e
8 changed files with 55 additions and 11 deletions

View File

@ -61,11 +61,11 @@ describe TopicList do
expect(TopicList.new('latest', other_topic.user, [other_topic]).tags.sort).to eq([tag.name, other_tag.name].sort)
end
it "with another category with no tags, should return exclude tags restricted to other categories" do
it "with another category with no tags, should return no tags" do
other_category = Fabricate(:category)
topic3 = Fabricate(:topic, category: other_category)
list = TopicList.new('latest', topic3.user, [topic3], { category: other_category.id, category_id: other_category.id })
expect(list.tags).to eq([other_tag.name])
expect(list.tags).to be_empty
end
end
end