mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Code fixes reported by static code analysis (#450)
This commit is contained in:
parent
f3f7e319ae
commit
c2236acf3a
14 changed files with 60 additions and 65 deletions
|
@ -22,8 +22,8 @@ describe "Kemal::WebSocketHandler" do
|
|||
|
||||
it "matches on given route" do
|
||||
handler = Kemal::WebSocketHandler::INSTANCE
|
||||
ws "/" { |socket, context| socket.send("Match") }
|
||||
ws "/no_match" { |socket, context| socket.send "No Match" }
|
||||
ws "/" { |socket| socket.send("Match") }
|
||||
ws "/no_match" { |socket| socket.send "No Match" }
|
||||
headers = HTTP::Headers{
|
||||
"Upgrade" => "websocket",
|
||||
"Connection" => "Upgrade",
|
||||
|
@ -37,7 +37,7 @@ describe "Kemal::WebSocketHandler" do
|
|||
|
||||
it "fetches named url parameters" do
|
||||
handler = Kemal::WebSocketHandler::INSTANCE
|
||||
ws "/:id" { |s, c| c.params.url["id"] }
|
||||
ws "/:id" { |_, c| c.params.url["id"] }
|
||||
headers = HTTP::Headers{
|
||||
"Upgrade" => "websocket",
|
||||
"Connection" => "Upgrade",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue