summaryrefslogtreecommitdiff
path: root/chef-config/spec
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-06-23 15:10:55 -0700
committerMatt Wrock <matt@mattwrock.com>2016-06-23 15:10:55 -0700
commitfbd47fb65265ebbe0cc536cc8ab087a5775b08b3 (patch)
tree47dfd8974560f4617478e5670e2190a659e3d4e6 /chef-config/spec
parent72ac27e97e8d2b3540a637f2833a902e6cb4ef37 (diff)
downloadchef-fbd47fb65265ebbe0cc536cc8ab087a5775b08b3.tar.gz
turn off fips with an empty environment var
Diffstat (limited to 'chef-config/spec')
-rw-r--r--chef-config/spec/unit/config_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index f09dbb517a..0ddb56cf0d 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -186,6 +186,16 @@ RSpec.describe ChefConfig::Config do
expect(ChefConfig::Config[:fips]).to eq(false)
end
+ context "when ENV['CHEF_FIPS'] is empty" do
+ before do
+ ENV["CHEF_FIPS"] = ""
+ end
+
+ it "returns false" do
+ expect(ChefConfig::Config[:fips]).to eq(false)
+ end
+ end
+
context "when ENV['CHEF_FIPS'] is set" do
before do
ENV["CHEF_FIPS"] = "1"