chore: Review fix

This commit is contained in:
iamsivin
2026-07-22 12:20:02 +05:30
parent 6e46af2381
commit 22e58e0e4e
3 changed files with 32 additions and 5 deletions
@@ -181,6 +181,15 @@ RSpec.describe 'Api::V1::Accounts::Portals', type: :request do
)
end
it 'allows administrators to set analytics config' do
put "/api/v1/accounts/#{account.id}/portals/#{portal.slug}",
params: { portal: { config: { analytics: { ga4: 'G-ADMIN12345' } } } },
headers: admin.create_new_auth_token
expect(response).to have_http_status(:success)
expect(portal.reload.config['analytics']).to eq('ga4' => 'G-ADMIN12345')
end
it 'preserves drafted locales when draft_locales is omitted' do
portal.update!(config: { allowed_locales: %w[en es fr], draft_locales: ['es'], default_locale: 'en' })