File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#
2- # Copyright (c) 2014 Red Hat Inc.
2+ # Copyright (c) 2014--2016 Red Hat Inc.
33#
44# This software is licensed to you under the GNU General Public License,
55# version 2 (GPLv2). There is NO WARRANTY for this software, express or
1414require 'openscap/ds/sds'
1515require 'openscap/source'
1616require 'openscap/xccdf/benchmark'
17- require 'openscap/xccdf/policy_model'
1817
1918class TestBenchmark < OpenSCAP ::TestCase
2019 def test_new_from_file
@@ -113,12 +112,6 @@ def test_items_fixes
113112 b . destroy
114113 end
115114
116- def test_policy_model_creation
117- b = benchmark_from_file
118- pm = OpenSCAP ::Xccdf ::PolicyModel . new b
119- pm . destroy
120- end
121-
122115 private
123116
124117 def benchmark_from_file
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2016 Red Hat Inc.
3+ #
4+ # This software is licensed to you under the GNU General Public License,
5+ # version 2 (GPLv2). There is NO WARRANTY for this software, express or
6+ # implied, including the implied warranties of MERCHANTABILITY or FITNESS
7+ # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
8+ # along with this software; if not, see
9+ # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
10+ #
11+
12+ require 'common/testcase'
13+ require 'openscap'
14+ require 'openscap/source'
15+ require 'openscap/xccdf/benchmark'
16+ require 'openscap/xccdf/policy'
17+ require 'openscap/xccdf/policy_model'
18+
19+ class TestPolicy < OpenSCAP ::TestCase
20+ def test_new_policy_model
21+ @s = OpenSCAP ::Source . new '../data/xccdf.xml'
22+ b = OpenSCAP ::Xccdf ::Benchmark . new @s
23+ pm = OpenSCAP ::Xccdf ::PolicyModel . new b
24+ pm . destroy
25+ end
26+ end
You can’t perform that action at this time.
0 commit comments