summaryrefslogtreecommitdiff
path: root/chef-config/spec
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2017-12-18 15:56:49 +0000
committerThom May <thom@chef.io>2017-12-18 15:56:49 +0000
commit5451b2a4640e62184a615c167600cb47f7bc363b (patch)
tree02ce913919e4036532131f5e6082ceea26344642 /chef-config/spec
parent57732ab92cc315c6161fbdef4ee17ceaebffc656 (diff)
downloadchef-5451b2a4640e62184a615c167600cb47f7bc363b.tar.gz
respond to review requests
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'chef-config/spec')
-rw-r--r--chef-config/spec/unit/workstation_config_loader_spec.rb16
1 files changed, 16 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 4bc9e2ba61..38fd727ce9 100644
--- a/chef-config/spec/unit/workstation_config_loader_spec.rb
+++ b/chef-config/spec/unit/workstation_config_loader_spec.rb
@@ -401,6 +401,7 @@ EOH
expect { config_loader.load_credentials }.not_to raise_error
expect(ChefConfig::Config.chef_server_url).to eq("https://api.chef.io/organizations/bedrock")
expect(ChefConfig::Config.client_key.to_s).to eq("#{home}/.chef/barney_rubble.pem")
+ expect(ChefConfig::Config.profile.to_s).to eq("default")
end
end
@@ -473,6 +474,21 @@ EOH
end
end
+ context "and contains both node_name and client_name" do
+ let(:content) do
+ content = <<EOH
+[default]
+node_name = 'barney'
+client_name = 'barney'
+EOH
+ content
+ end
+
+ it "raises a ConfigurationError" do
+ expect { config_loader.load_credentials }.to raise_error(ChefConfig::ConfigurationError)
+ end
+ end
+
context "and has a syntax error" do
let(:content) { "<<<<<" }