feat: Save UI state in the database (#1635)

feat: Save UI state in the database
This commit is contained in:
Pranav Raj S 2021-01-10 19:25:33 +05:30 committed by GitHub
parent 37d8e1c9a0
commit 160a6fc6cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 129 additions and 15 deletions

View file

@ -87,6 +87,17 @@ RSpec.describe 'Profile API', type: :request do
expect(response).to have_http_status(:success)
expect(::OnlineStatusTracker.get_status(account.id, agent.id)).to eq('offline')
end
it 'updates the ui settings' do
put '/api/v1/profile',
params: { profile: { ui_settings: { is_contact_sidebar_open: false } } },
headers: agent.create_new_auth_token,
as: :json
expect(response).to have_http_status(:success)
json_response = JSON.parse(response.body)
expect(json_response['ui_settings']['is_contact_sidebar_open']).to eq(false)
end
end
end
end