Convert admin/dashboard spec controller->system (#34208)
This commit is contained in:
31
spec/system/admin/dashboard_spec.rb
Normal file
31
spec/system/admin/dashboard_spec.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Admin Dashboard' do
|
||||
describe 'Viewing the dashboard page' do
|
||||
let(:user) { Fabricate(:owner_user) }
|
||||
|
||||
before do
|
||||
stub_system_checks
|
||||
Fabricate :software_update
|
||||
sign_in(user)
|
||||
end
|
||||
|
||||
it 'returns page with system check messages' do
|
||||
visit admin_dashboard_path
|
||||
|
||||
expect(page)
|
||||
.to have_title(I18n.t('admin.dashboard.title'))
|
||||
.and have_content(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
|
||||
Reference in New Issue
Block a user