FIX: Don't ignore category in search when using category filters.

This commit is contained in:
Guo Xiang Tan
2019-03-19 11:23:14 +08:00
parent dafba62931
commit 64f20e7e7a
2 changed files with 10 additions and 1 deletions

View File

@ -420,6 +420,7 @@ describe Search do
let!(:ignored_category) do
Fabricate(:category,
name: "monkey Category 1",
slug: "test",
search_priority: Searchable::PRIORITIES[:ignore]
)
end
@ -432,6 +433,10 @@ describe Search do
)
expect(search.posts).to contain_exactly(category.topic.first_post, post)
search = Search.execute("monkey #test")
expect(search.posts).to contain_exactly(ignored_category.topic.first_post)
end
describe "with child categories" do