Skip to content

Commit b07add0

Browse files
Test rack.protocol response header.
1 parent cfed42d commit b07add0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/protocol/rack/adapter/rack31.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
let(:request) {Protocol::HTTP::Request.new("https", "example.com", "GET", "/", "http/1.1", Protocol::HTTP::Headers[{"accept" => "text/html"}], body)}
1919
let(:response) {adapter.call(request)}
2020

21+
with "rack.protocol response header" do
22+
let(:app) {->(env) {[200, {"rack.protocol" => "websocket"}, []]}}
23+
24+
it "can make a response with the specified protocol" do
25+
expect(response.protocol).to be == "websocket"
26+
end
27+
end
28+
2129
with "set-cookie headers that has multiple values" do
2230
let(:app) {->(env) {[200, {"set-cookie" => ["a=b", "x=y"]}, []]}}
2331

0 commit comments

Comments
 (0)