mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Update delegate macro in context
This commit is contained in:
parent
64fac62804
commit
8b6700695d
2 changed files with 1 additions and 24 deletions
|
@ -56,25 +56,4 @@ describe "Kemal::WebSocketHandler" do
|
|||
response.headers["Sec-WebSocket-Accept"].should eq("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")
|
||||
response.upgrade_handler.should_not be_nil
|
||||
end
|
||||
|
||||
it "has a sockets array" do
|
||||
|
||||
ws_handler = Kemal::WebSocketHandler.new "/" do |socket|
|
||||
|
||||
end
|
||||
headers = HTTP::Headers{
|
||||
"Upgrade": "websocket",
|
||||
"Connection": "Upgrade",
|
||||
"Sec-WebSocket-Key": "dGhlIHNhbXBsZSBub25jZQ==",
|
||||
}
|
||||
|
||||
# Websocket request
|
||||
request = HTTP::Request.new("GET", "/", headers)
|
||||
response = ws_handler.call request
|
||||
response.status_code.should eq(101)
|
||||
response.headers["Upgrade"].should eq("websocket")
|
||||
response.headers["Connection"].should eq("Upgrade")
|
||||
response.headers["Sec-WebSocket-Accept"].should eq("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")
|
||||
response.upgrade_handler.should_not be_nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue