Convert admin/dashboard spec controller->system (#34208)

This commit is contained in:
Matt Jankowski 2025-03-19 04:32:36 -04:00 committed by GitHub
parent 539a06f189
commit f7b1769e8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,35 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Admin::DashboardController do
render_views
describe 'GET #index' do
let(:user) { Fabricate(:owner_user) }
before do
stub_system_checks
Fabricate :software_update
sign_in(user)
end
it 'returns http success and body with system check messages' do
get :index
expect(response)
.to have_http_status(200)
.and have_attributes(
body: include(I18n.t('admin.system_checks.software_version_patch_check.message_html'))
)
end
private
def stub_system_checks
stub_const 'Admin::SystemCheck::ACTIVE_CHECKS', [
Admin::SystemCheck::SoftwareVersionCheck,
]
end
end
end