fix: URL encode params on Platform API call (#3929)
Add URL encoding for the params in platform API calls. Fixes: product#307 Fixes: #2186
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Platform Users API', type: :request do
|
||||
let!(:user) { create(:user, custom_attributes: { test: 'test' }) }
|
||||
let!(:user) { create(:user, email: 'dev+testing@chatwoot.com', custom_attributes: { test: 'test' }) }
|
||||
|
||||
describe 'GET /platform/api/v1/users/{user_id}' do
|
||||
context 'when it is an unauthenticated platform app' do
|
||||
@@ -71,7 +71,7 @@ RSpec.describe 'Platform Users API', type: :request do
|
||||
|
||||
expect(response).to have_http_status(:success)
|
||||
data = JSON.parse(response.body)
|
||||
expect(data['url']).to include('sso_auth_token')
|
||||
expect(data['url']).to include('email=dev%2Btesting%40chatwoot.com&sso_auth_token=')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user