Skip to content

Commit

Permalink
Use consistent response headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 22, 2024
1 parent 260d827 commit 735efbe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fixtures/async/http/a_protocol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ module HTTP
elsif request.method == 'GET'
expect(request.body).to be_nil

::Protocol::HTTP::Response[200, {
'remote-address' => request.remote_address.inspect
}, ["#{request.method} #{request.version}"]]
::Protocol::HTTP::Response[200, {'my-header' => 'my-value'}, ["#{request.method} #{request.version}"]]
else
::Protocol::HTTP::Response[200, {}, ["Hello World"]]
end
Expand Down Expand Up @@ -276,8 +274,8 @@ def after
tempfile.close
end

it "has remote-address header" do
expect(response.headers['remote-address']).not.to be_nil
it "has response header" do
expect(response.headers['my-header']).to be == ['my-value']
end

it "has protocol version" do
Expand Down

0 comments on commit 735efbe

Please sign in to comment.