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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user