summaryrefslogtreecommitdiff
path: root/spec/unit/http_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/http_spec.rb')
-rw-r--r--spec/unit/http_spec.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/unit/http_spec.rb b/spec/unit/http_spec.rb
index ebb96d25e1..c35f8baaeb 100644
--- a/spec/unit/http_spec.rb
+++ b/spec/unit/http_spec.rb
@@ -16,11 +16,11 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
-require 'chef/http'
-require 'chef/http/basic_client'
-require 'chef/http/socketless_chef_zero_client'
+require "chef/http"
+require "chef/http/basic_client"
+require "chef/http/socketless_chef_zero_client"
class Chef::HTTP
public :create_url
@@ -43,26 +43,26 @@ describe Chef::HTTP do
describe "create_url" do
- it 'should return a correctly formatted url 1/3 CHEF-5261' do
- http = Chef::HTTP.new('http://www.getchef.com')
- expect(http.create_url('api/endpoint')).to eql(URI.parse('http://www.getchef.com/api/endpoint'))
+ it "should return a correctly formatted url 1/3 CHEF-5261" do
+ http = Chef::HTTP.new("http://www.getchef.com")
+ expect(http.create_url("api/endpoint")).to eql(URI.parse("http://www.getchef.com/api/endpoint"))
end
- it 'should return a correctly formatted url 2/3 CHEF-5261' do
- http = Chef::HTTP.new('http://www.getchef.com/')
- expect(http.create_url('/organization/org/api/endpoint/')).to eql(URI.parse('http://www.getchef.com/organization/org/api/endpoint/'))
+ it "should return a correctly formatted url 2/3 CHEF-5261" do
+ http = Chef::HTTP.new("http://www.getchef.com/")
+ expect(http.create_url("/organization/org/api/endpoint/")).to eql(URI.parse("http://www.getchef.com/organization/org/api/endpoint/"))
end
- it 'should return a correctly formatted url 3/3 CHEF-5261' do
- http = Chef::HTTP.new('http://www.getchef.com/organization/org///')
- expect(http.create_url('///api/endpoint?url=http://foo.bar')).to eql(URI.parse('http://www.getchef.com/organization/org/api/endpoint?url=http://foo.bar'))
+ it "should return a correctly formatted url 3/3 CHEF-5261" do
+ http = Chef::HTTP.new("http://www.getchef.com/organization/org///")
+ expect(http.create_url("///api/endpoint?url=http://foo.bar")).to eql(URI.parse("http://www.getchef.com/organization/org/api/endpoint?url=http://foo.bar"))
end
# As per: https://github.com/opscode/chef/issues/2500
- it 'should treat scheme part of the URI in a case-insensitive manner' do
+ it "should treat scheme part of the URI in a case-insensitive manner" do
http = Chef::HTTP.allocate # Calling Chef::HTTP::new sets @url, don't want that.
- expect { http.create_url('HTTP://www1.chef.io/') }.not_to raise_error
- expect(http.create_url('HTTP://www2.chef.io/')).to eql(URI.parse('http://www2.chef.io/'))
+ expect { http.create_url("HTTP://www1.chef.io/") }.not_to raise_error
+ expect(http.create_url("HTTP://www2.chef.io/")).to eql(URI.parse("http://www2.chef.io/"))
end
end # create_url
@@ -117,7 +117,7 @@ describe Chef::HTTP do
end
it "retries the request 5 times" do
- http.get('/')
+ http.get("/")
end
end