Skip to content

Commit

Permalink
Remove http:// from test URL because Net::HTTP expects a host
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed Aug 8, 2022
1 parent d327547 commit 5567e1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/acceptance/net_http/net_http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ class TestMarshalingInWebMockNetHTTP

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7.0')
it "uses the StubSocket to provide IP address" do
Net::HTTP.start("http://example.com") do |http|
Net::HTTP.start("example.com") do |http|
expect(http.ipaddr).to eq("127.0.0.1")
end
end
end

it "defines common socket methods" do
Net::HTTP.start("http://example.com") do |http|
Net::HTTP.start("example.com") do |http|
socket = http.instance_variable_get(:@socket)
expect(socket.io.ssl_version).to eq("TLSv1.3")
expect(socket.io.cipher).to eq(["TLS_AES_128_GCM_SHA256", "TLSv1.3", 128, 128])
Expand Down

0 comments on commit 5567e1d

Please sign in to comment.