mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: tags can be filtered on categoryId without a q param (#8264)
This commit is contained in:
committed by
Martin Brennan
parent
7a264217f2
commit
0ba28e344b
@@ -395,6 +395,14 @@ describe TagsController do
|
||||
category_names: category.name
|
||||
))
|
||||
end
|
||||
|
||||
it "can filter on category without q param" do
|
||||
nope = Fabricate(:tag, name: 'nope')
|
||||
get "/tags/filter/search.json", params: { categoryId: category.id }
|
||||
expect(response.status).to eq(200)
|
||||
json = ::JSON.parse(response.body)
|
||||
expect(json["results"].map { |j| j["id"] }.sort).to eq([yup.name])
|
||||
end
|
||||
end
|
||||
|
||||
it "matches tags after sanitizing input" do
|
||||
|
||||
Reference in New Issue
Block a user