Latest changes

This commit is contained in:
Nithin David Thomas
2024-02-15 22:22:21 +05:30
parent 90a6a9d058
commit f7088b29cc
12 changed files with 156 additions and 88 deletions
@@ -213,6 +213,16 @@ RSpec.describe 'Accounts API', type: :request do
end
end
it 'updates onboarding step to invite_agents if onboarding step is present in account custom attributes' do
account.update(custom_attributes: { onboarding_step: 'completed' })
put "/api/v1/accounts/#{account.id}",
params: params,
headers: admin.create_new_auth_token,
as: :json
expect(account.reload.custom_attributes['onboarding_step']).to eq('invite_agents')
end
it 'Throws error 422' do
params[:name] = 'test' * 999