mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
Feature: Rewamp super admin dashboard (#882)
This commit is contained in:
@@ -16,7 +16,6 @@ RSpec.describe 'Super Admin access tokens API', type: :request do
|
||||
sign_in super_admin
|
||||
get '/super_admin/access_tokens'
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.body).to include('New access token')
|
||||
expect(response.body).to include(super_admin.access_token.token)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,23 +3,19 @@ require 'rails_helper'
|
||||
RSpec.describe 'Super Admin Account Users API', type: :request do
|
||||
let(:super_admin) { create(:super_admin) }
|
||||
|
||||
describe 'GET /super_admin/account_users' do
|
||||
describe 'GET /super_admin/account_users/new' do
|
||||
context 'when it is an unauthenticated super admin' do
|
||||
it 'returns unauthorized' do
|
||||
get '/super_admin/account_users'
|
||||
get '/super_admin/account_users/new'
|
||||
expect(response).to have_http_status(:redirect)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when it is an authenticated super admin' do
|
||||
let!(:account_user) { create(:account_user) }
|
||||
|
||||
it 'shows the list of account users' do
|
||||
it 'shows the account user create page' do
|
||||
sign_in super_admin
|
||||
get '/super_admin/account_users'
|
||||
get '/super_admin/account_users/new'
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.body).to include(account_user.account.id.to_s)
|
||||
expect(response.body).to include(account_user.user.id.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ RSpec.describe 'Super Admin', type: :request do
|
||||
sign_in super_admin
|
||||
get '/super_admin'
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.body).to include('New user')
|
||||
expect(response.body).to include('Dashboard')
|
||||
|
||||
sign_out super_admin
|
||||
get '/super_admin'
|
||||
|
||||
Reference in New Issue
Block a user