diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-12-09 10:10:36 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-12-09 10:10:36 -0800 |
commit | 6d8c76e17366380a44685c45a9f59f5f5cfa5318 (patch) | |
tree | 36dad01b8743d861099b4657ddda3d009fbc432a /chef-config/spec | |
parent | 197bbe93998ef796e96774590c70356439edbf2b (diff) | |
parent | 417d116501c7d87d5ce5b52ac7f8aa5de5dda043 (diff) | |
download | chef-6d8c76e17366380a44685c45a9f59f5f5cfa5318.tar.gz |
Merge branch 'will/fix_credentials_ssl_verify_mode' of https://github.com/teknofire/chef into teknofire-will/fix_credentials_ssl_verify_mode
Diffstat (limited to 'chef-config/spec')
-rw-r--r-- | chef-config/spec/unit/workstation_config_loader_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chef-config/spec/unit/workstation_config_loader_spec.rb b/chef-config/spec/unit/workstation_config_loader_spec.rb index 704c3ac2dc..3248184d77 100644 --- a/chef-config/spec/unit/workstation_config_loader_spec.rb +++ b/chef-config/spec/unit/workstation_config_loader_spec.rb @@ -583,6 +583,36 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do end end + context "and ssl_verify_mode is a symbol string" do + let(:content) do + content = <<~EOH + [default] + ssl_verify_mode = ":verify_none" + EOH + content + end + + it "raises a ConfigurationError" do + expect { config_loader.load_credentials }.not_to raise_error + expect(ChefConfig::Config.ssl_verify_mode).to eq(:verify_none) + end + end + + context "and ssl_verify_mode is a string" do + let(:content) do + content = <<~EOH + [default] + ssl_verify_mode = "verify_none" + EOH + content + end + + it "raises a ConfigurationError" do + expect { config_loader.load_credentials }.not_to raise_error + expect(ChefConfig::Config.ssl_verify_mode).to eq(:verify_none) + end + end + context "and has a syntax error" do let(:content) { "<<<<<" } |