summaryrefslogtreecommitdiff
path: root/spec/unit/api_client_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/api_client_spec.rb')
-rw-r--r--spec/unit/api_client_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/unit/api_client_spec.rb b/spec/unit/api_client_spec.rb
index 398181bfd0..a8ac4f747b 100644
--- a/spec/unit/api_client_spec.rb
+++ b/spec/unit/api_client_spec.rb
@@ -82,7 +82,6 @@ describe Chef::ApiClient do
expect { @client.public_key Hash.new }.to raise_error(ArgumentError)
end
-
it "has a private key attribute" do
@client.private_key("super private")
expect(@client.private_key).to eq("super private")
@@ -267,12 +266,11 @@ describe Chef::ApiClient do
end
let :private_key_data do
- File.open(Chef::Config[:client_key], "r") {|f| f.read.chomp }
+ File.open(Chef::Config[:client_key], "r") { |f| f.read.chomp }
end
end
-
describe "when requesting a new key" do
before do
@http_client = double("Chef::ServerAPI mock")
@@ -299,7 +297,6 @@ describe Chef::ApiClient do
expect(@http_client).to receive(:get).with("clients/lost-my-key").and_return(@api_client_without_key)
end
-
context "and the client exists on a Chef 11-like server" do
before do
@api_client_with_key = Chef::ApiClient.new
@@ -322,7 +319,7 @@ describe Chef::ApiClient do
context "and the client exists on a Chef 10-like server" do
before do
- @api_client_with_key = {"name" => "lost-my-key", "private_key" => "the new private key"}
+ @api_client_with_key = { "name" => "lost-my-key", "private_key" => "the new private key" }
expect(@http_client).to receive(:put).
with("clients/lost-my-key", :name => "lost-my-key", :admin => false, :validator => false, :private_key => true).
and_return(@api_client_with_key)