mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:05:53 +08:00
First pass
This commit is contained in:
@ -145,6 +145,10 @@ describe TopicQuery do
|
||||
# expect(TopicQuery.new(moderator, tags: [tag.id, other_tag.id]).list_latest.topics.map(&:id)).to eq([tagged_topic3.id].sort)
|
||||
end
|
||||
|
||||
it "can return topics with all specified tags" do
|
||||
expect(TopicQuery.new(moderator, tags: [tag.name, other_tag.name], match_all_tags: true).list_latest.topics.map(&:id)).to eq([tagged_topic3.id])
|
||||
end
|
||||
|
||||
it "can return topics with no tags" do
|
||||
expect(TopicQuery.new(moderator, no_tags: true).list_latest.topics.map(&:id)).to eq([no_tags_topic.id])
|
||||
end
|
||||
|
Reference in New Issue
Block a user