summaryrefslogtreecommitdiff
path: root/spec/unit/http/ssl_policies_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/http/ssl_policies_spec.rb')
-rw-r--r--spec/unit/http/ssl_policies_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/http/ssl_policies_spec.rb b/spec/unit/http/ssl_policies_spec.rb
index 5ebebf39b1..98f1fa9c37 100644
--- a/spec/unit/http/ssl_policies_spec.rb
+++ b/spec/unit/http/ssl_policies_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'chef/http/ssl_policies'
+require "spec_helper"
+require "chef/http/ssl_policies"
describe "HTTP SSL Policy" do
@@ -68,8 +68,8 @@ describe "HTTP SSL Policy" do
end
it "should set the CA file if that is set in the configuration" do
- Chef::Config[:ssl_ca_file] = CHEF_SPEC_DATA + '/ssl/5e707473.0'
- expect(http_client.ca_file).to eq(CHEF_SPEC_DATA + '/ssl/5e707473.0')
+ Chef::Config[:ssl_ca_file] = CHEF_SPEC_DATA + "/ssl/5e707473.0"
+ expect(http_client.ca_file).to eq(CHEF_SPEC_DATA + "/ssl/5e707473.0")
end
end
@@ -89,12 +89,12 @@ describe "HTTP SSL Policy" do
it "raises ConfigurationError if the certificate file doesn't exist" do
Chef::Config[:ssl_client_cert] = "/dev/null/nothing_here"
- Chef::Config[:ssl_client_key] = CHEF_SPEC_DATA + '/ssl/chef-rspec.key'
+ Chef::Config[:ssl_client_key] = CHEF_SPEC_DATA + "/ssl/chef-rspec.key"
expect {http_client}.to raise_error(Chef::Exceptions::ConfigurationError)
end
it "raises ConfigurationError if the certificate file doesn't exist" do
- Chef::Config[:ssl_client_cert] = CHEF_SPEC_DATA + '/ssl/chef-rspec.cert'
+ Chef::Config[:ssl_client_cert] = CHEF_SPEC_DATA + "/ssl/chef-rspec.cert"
Chef::Config[:ssl_client_key] = "/dev/null/nothing_here"
expect {http_client}.to raise_error(Chef::Exceptions::ConfigurationError)
end
@@ -106,10 +106,10 @@ describe "HTTP SSL Policy" do
end
it "configures the HTTP client's cert and private key" do
- Chef::Config[:ssl_client_cert] = CHEF_SPEC_DATA + '/ssl/chef-rspec.cert'
- Chef::Config[:ssl_client_key] = CHEF_SPEC_DATA + '/ssl/chef-rspec.key'
- expect(http_client.cert.to_s).to eq(OpenSSL::X509::Certificate.new(IO.read(CHEF_SPEC_DATA + '/ssl/chef-rspec.cert')).to_s)
- expect(http_client.key.to_s).to eq(IO.read(CHEF_SPEC_DATA + '/ssl/chef-rspec.key'))
+ Chef::Config[:ssl_client_cert] = CHEF_SPEC_DATA + "/ssl/chef-rspec.cert"
+ Chef::Config[:ssl_client_key] = CHEF_SPEC_DATA + "/ssl/chef-rspec.key"
+ expect(http_client.cert.to_s).to eq(OpenSSL::X509::Certificate.new(IO.read(CHEF_SPEC_DATA + "/ssl/chef-rspec.cert")).to_s)
+ expect(http_client.key.to_s).to eq(IO.read(CHEF_SPEC_DATA + "/ssl/chef-rspec.key"))
end
end