Files
leadchat/spec/controllers/super_admin/instance_statuses_controller_spec.rb
Nithin David Thomas f002870c6a feat: Super admin design improvements (#8517)
- Revamp the super admin design
- Introduce a new settings page for support and billing settings
- Move the access tokens into users, agent bots and platform app show pages


Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-12-08 19:40:35 -08:00

26 lines
815 B
Ruby

require 'rails_helper'
RSpec.describe 'Super Admin Instance status', type: :request do
let(:super_admin) { create(:super_admin) }
describe 'GET /super_admin/instance_status' do
context 'when it is an unauthenticated super admin' do
it 'returns unauthorized' do
get '/super_admin/instance_status'
expect(response).to have_http_status(:redirect)
end
end
context 'when it is an authenticated super admin' do
it 'shows the instance_status page' do
sign_in(super_admin, scope: :super_admin)
get '/super_admin/instance_status'
expect(response).to have_http_status(:success)
expect(response.body).to include('Chatwoot version')
sha = `git rev-parse HEAD`
expect(response.body).to include(sha)
end
end
end
end