chore: ability to run Chatwoot as API only server (#2344)
- Ability to run chatwoot as an API only server - Removes action cable testing gem since it is merged to rails 6
This commit is contained in:
@@ -17,4 +17,18 @@ describe '/app/login', type: :request do
|
||||
ENV['DEFAULT_LOCALE'] = 'en'
|
||||
end
|
||||
end
|
||||
|
||||
# Routes are loaded once on app start
|
||||
# hence Rails.application.reload_routes! is used in this spec
|
||||
# ref : https://stackoverflow.com/a/63584877/939299
|
||||
context 'with CW_API_ONLY_SERVER true' do
|
||||
it 'returns 404' do
|
||||
ENV['CW_API_ONLY_SERVER'] = 'true'
|
||||
Rails.application.reload_routes!
|
||||
get '/app/login'
|
||||
expect(response).to have_http_status(:not_found)
|
||||
ENV['CW_API_ONLY_SERVER'] = nil
|
||||
Rails.application.reload_routes!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user