FEATURE: Use PG ts_headline for highlighting topic title in search.

This commit is contained in:
Guo Xiang Tan
2020-08-07 12:43:09 +08:00
parent 1d2ba8fd52
commit e60c74d3c1
10 changed files with 93 additions and 37 deletions

View File

@ -422,7 +422,11 @@ describe Search do
)
expect(result.posts.map(&:id)).to contain_exactly(reply.id)
expect(result.blurb(result.posts.first)).to eq(expected_blurb)
post = result.posts.first
expect(result.blurb(post)).to eq(expected_blurb)
expect(post.topic_title_headline).to eq(topic.fancy_title)
end
it 'returns the right post and blurb for searches with phrase' do