feat(v4): Update the help center portal design (#10296)

Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
Sivin Varghese
2024-10-24 10:39:36 +05:30
committed by GitHub
parent 6d3ecfe3c1
commit a3855a8d1d
144 changed files with 6376 additions and 6604 deletions

View File

@@ -68,6 +68,13 @@ RSpec.describe 'Public Articles API', type: :request do
expect(article.reload.views).to eq 1
end
it 'does not increment the view count if the article is not published' do
draft_article = create(:article, category: category, status: :draft, portal: portal, account_id: account.id, author_id: agent.id, views: 0)
get "/hc/#{portal.slug}/articles/#{draft_article.slug}"
expect(response).to have_http_status(:success)
expect(draft_article.reload.views).to eq 0
end
it 'returns the article with the id with a different locale' do
article_in_locale = create(:article, category: category_2, portal: portal, account_id: account.id, author_id: agent.id)
get "/hc/#{portal.slug}/articles/#{article_in_locale.slug}"

View File

@@ -54,7 +54,7 @@ RSpec.describe Article do
it 'adds locale to article from portal' do
article = create(:article, content: 'This is the content', description: 'this is the description',
slug: 'this-is-title', title: 'this is title',
portal_id: portal.id, author_id: user.id)
portal_id: portal.id, author_id: user.id, locale: '')
expect(article.locale).to eq(portal.default_locale)
end
end