Sha256: 71df12d3c0c69d4799c40feb016361905cb15df58c640b8effce0e400c83aad3

Contents?: true

Size: 987 Bytes

Versions: 7

Compression:

Stored size: 987 Bytes

Contents

#
# Copyright (c) 2014 Red Hat Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#

require 'common/testcase'
require 'openscap'
require 'openscap/source'
require 'openscap/xccdf/benchmark'
require 'openscap/xccdf/profile'

class TestProfile < OpenSCAP::TestCase
  def test_new_from_file
    @s = OpenSCAP::Source.new '../data/xccdf.xml'
    b = OpenSCAP::Xccdf::Benchmark.new @s
    assert !b.nil?
    assert b.profiles.size == 1, b.profiles.to_s
    profile1 = b.profiles['xccdf_org.ssgproject.content_profile_common']
    assert profile1
    assert profile1.title == 'Common Profile for General-Purpose Fedora Systems'
    b.destroy
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
openscap-0.4.8 test/xccdf/profile_test.rb
openscap-0.4.7 test/xccdf/profile_test.rb
openscap-0.4.4 test/xccdf/profile_test.rb
openscap-0.4.3 test/xccdf/profile_test.rb
openscap-0.4.2 test/xccdf/profile_test.rb
openscap-0.4.1 test/xccdf/profile_test.rb
openscap-0.4.0 test/xccdf/profile_test.rb