Skip to content

Commit 735efbe

Browse files
committed
Use consistent response headers.
1 parent 260d827 commit 735efbe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

fixtures/async/http/a_protocol.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ module HTTP
190190
elsif request.method == 'GET'
191191
expect(request.body).to be_nil
192192

193-
::Protocol::HTTP::Response[200, {
194-
'remote-address' => request.remote_address.inspect
195-
}, ["#{request.method} #{request.version}"]]
193+
::Protocol::HTTP::Response[200, {'my-header' => 'my-value'}, ["#{request.method} #{request.version}"]]
196194
else
197195
::Protocol::HTTP::Response[200, {}, ["Hello World"]]
198196
end
@@ -276,8 +274,8 @@ def after
276274
tempfile.close
277275
end
278276

279-
it "has remote-address header" do
280-
expect(response.headers['remote-address']).not.to be_nil
277+
it "has response header" do
278+
expect(response.headers['my-header']).to be == ['my-value']
281279
end
282280

283281
it "has protocol version" do

0 commit comments

Comments
 (0)