system_report_spec.rb 730 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'SystemReport', authenticated_as: -> { user }, type: :request do
  4. describe 'returns System Report' do
  5. let(:user) { create(:admin) }
  6. it 'includes version information' do
  7. get '/api/v1/system_report', params: {}, as: :json
  8. expect(json_response['fetch']['system_report']).to include('Version' => Version.get)
  9. end
  10. end
  11. describe 'returns System Report Plugins' do
  12. let(:user) { create(:admin) }
  13. it 'includes plugins information' do
  14. get '/api/v1/system_report/plugins', params: {}, as: :json
  15. expect(json_response['plugins']).to eq(SystemReport.plugins)
  16. end
  17. end
  18. end