This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2018-12-14 11:36:18 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe Admin::DashboardController, type: :controller do
|
2021-05-06 05:22:54 -07:00
|
|
|
render_views
|
|
|
|
|
2018-12-14 11:36:18 -08:00
|
|
|
describe 'GET #index' do
|
2021-05-06 05:22:54 -07:00
|
|
|
before do
|
|
|
|
allow(Admin::SystemCheck).to receive(:perform).and_return([
|
|
|
|
Admin::SystemCheck::Message.new(:database_schema_check),
|
|
|
|
Admin::SystemCheck::Message.new(:rules_check, nil, admin_rules_path),
|
|
|
|
Admin::SystemCheck::Message.new(:sidekiq_process_check, 'foo, bar'),
|
|
|
|
])
|
2018-12-14 11:36:18 -08:00
|
|
|
sign_in Fabricate(:user, admin: true)
|
2021-05-06 05:22:54 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns 200' do
|
2018-12-14 11:36:18 -08:00
|
|
|
get :index
|
|
|
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|