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-08 18:01:07 -08:00
committed by GitHub
co-authored by Muhsin Keloth Pranav Raj S
parent 7041d86e4d
commit 268e26625b
7 changed files with 61 additions and 5 deletions
+18
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