diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/compliance/runner_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/compliance/runner_spec.rb b/spec/unit/compliance/runner_spec.rb index d982174e67..d46d756b0e 100644 --- a/spec/unit/compliance/runner_spec.rb +++ b/spec/unit/compliance/runner_spec.rb @@ -19,6 +19,13 @@ describe Chef::Compliance::Runner do expect(runner).to be_enabled end + it "is false if the node attributes have audit profiles and the audit cookbook is not present, and the compliance mode attribute is unset" do + node.normal["audit"]["profiles"]["ssh"] = { 'compliance': "base/ssh" } + node.normal["audit"]["compliance_mode"] = false + + expect(runner).to be_enabled + end + it "is false if the node attributes have audit profiles and the audit cookbook is present" do stub_const("::Reporter::ChefAutomate", true) node.normal["audit"]["profiles"]["ssh"] = { 'compliance': "base/ssh" } |