diff options
author | danielsdeleo <dan@opscode.com> | 2012-12-18 10:47:24 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2012-12-18 17:10:05 -0800 |
commit | a61c9865684466adcc9c933f05eebc1090624ea0 (patch) | |
tree | 224e1719aa7a49a2cd3e1e3c7265d204701121b5 /spec/unit/api_client_spec.rb | |
parent | 2de707d27251f38790a71043843749a570302aaf (diff) | |
download | chef-a61c9865684466adcc9c933f05eebc1090624ea0.tar.gz |
[CHEF-3689] Extract registration to a class
Diffstat (limited to 'spec/unit/api_client_spec.rb')
-rw-r--r-- | spec/unit/api_client_spec.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/spec/unit/api_client_spec.rb b/spec/unit/api_client_spec.rb index b47df6ad5c..6368082815 100644 --- a/spec/unit/api_client_spec.rb +++ b/spec/unit/api_client_spec.rb @@ -146,8 +146,6 @@ describe Chef::ApiClient do before do Chef::Config[:node_name] = "silent-bob" Chef::Config[:client_key] = File.expand_path('ssl/private_key.pem', CHEF_SPEC_DATA) - Chef::Config[:validation_client_name] = "test-validator" - Chef::Config[:validation_key] = File.expand_path('ssl/private_key.pem', CHEF_SPEC_DATA) end after do @@ -155,23 +153,15 @@ describe Chef::ApiClient do Chef::Config[:client_key] = nil end - let :private_key_data do - File.open(Chef::Config[:client_key], "rb") {|f| f.read.chomp } - end - it "has an HTTP client configured with default credentials" do @client.http_api.should be_a_kind_of(Chef::REST) @client.http_api.client_name.should == "silent-bob" @client.http_api.signing_key.to_s.should == private_key_data end - it "has an HTTP client configured with validator credentials" do - @client.http_api_as_validator.should be_a_kind_of(Chef::REST) - @client.http_api_as_validator.client_name.should == "test-validator" - @client.http_api_as_validator.signing_key.should == private_key_data - end end + describe "when requesting a new key" do before do @http_client = mock("Chef::REST mock") |