diff --git a/spec/kemal_ws_handler_spec.cr b/spec/kemal_ws_handler_spec.cr index 876d39a..4cb5855 100644 --- a/spec/kemal_ws_handler_spec.cr +++ b/spec/kemal_ws_handler_spec.cr @@ -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 diff --git a/src/kemal/context.cr b/src/kemal/context.cr index 173bd71..37192d2 100644 --- a/src/kemal/context.cr +++ b/src/kemal/context.cr @@ -23,7 +23,5 @@ class Kemal::Context end delegate headers, @request - delegate status_code, @response - delegate :"status_code=", @response - delegate :"content_type=", @response + delegate status_code, :"status_code=", :"content_type=", @response end