Sha256: c36eb0581e3b3f833d4b59ad82c1a47c0cb2b57587e6653109f2727d63f2e1c1

Contents?: true

Size: 819 Bytes

Versions: 22

Compression:

Stored size: 819 Bytes

Contents

require 'test_plugin_helper'

class PolicyDashboardHelperTest < ActionView::TestCase
  include ArfReportDashboardHelper
  include PolicyDashboardHelper

  test 'should return data for policy breakdown chart' do
    report = {
      :compliant_hosts => 5,
      :incompliant_hosts => 6,
      :inconclusive_hosts => 7,
      :report_missing => 8
    }
    res = policy_breakdown_chart_data(report)
    assert_equal 4, res.size
    assert_include res, ['Compliant hosts', 5, PolicyDashboardHelper::COLORS[:compliant_hosts]]
    assert_include res, ['Incompliant hosts', 6, PolicyDashboardHelper::COLORS[:incompliant_hosts]]
    assert_include res, ['Inconclusive', 7, PolicyDashboardHelper::COLORS[:inconclusive_hosts]]
    assert_include res, ['Not audited', 8, PolicyDashboardHelper::COLORS[:report_missing]]
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
foreman_openscap-10.1.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-10.0.3 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-10.0.2 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-10.0.1 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-10.0.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-9.0.4 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-9.0.3 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-9.0.2 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-9.0.1 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-9.0.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-8.0.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-7.1.1 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-7.1.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-7.0.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-6.0.0 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-5.2.3 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-5.2.2 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-5.1.1 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-5.2.1 test/helpers/policy_dashboard_helper_test.rb
foreman_openscap-5.2.0 test/helpers/policy_dashboard_helper_test.rb