feat: Adds the ability to see the popular articles (#8152)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sivin Varghese
2023-11-09 07:31:07 +05:30
committed by GitHub
parent 7041d86e4d
commit 268e26625b
7 changed files with 61 additions and 5 deletions

View File

@@ -101,4 +101,22 @@ describe PortalHelper do
end
end
end
describe '#generate_article_link' do
context 'when theme is not present' do
it 'returns the correct link' do
expect(helper.generate_article_link('portal_slug', 'article_slug', nil)).to eq(
'/hc/portal_slug/articles/article_slug'
)
end
end
context 'when theme is present' do
it 'returns the correct link' do
expect(helper.generate_article_link('portal_slug', 'article_slug', 'dark')).to eq(
'/hc/portal_slug/articles/article_slug?theme=dark'
)
end
end
end
end