8000 Improvements to coverage and tests. · zarqman/async-websocket@8546d08 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 8546d08

Browse files
committed
Improvements to coverage and tests.
1 parent 8428f23 commit 8546d08

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

fixtures/rack_application/config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ClosedLogger
1414
response = @app.call(env)
1515

1616
response[2] = Rack::BodyProxy.new(response[2]) do
17-
Console.logger.info(self, "Connection closed!")
17+
Console.logger.debug(self, "Connection closed!")
1818
end
1919

2020
return response

lib/async/websocket/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def connect(authority, path, headers: nil, handler: Connection, extensions: ::Pr
120120
response = nil
121121
stream = nil
122122

123-
connction = handler.call(framer, protocol, extensions, **@options, &block)
123+
return handler.call(framer, protocol, extensions, **@options, &block)
124124
ensure
125125
pool.release(connection) if connection
126126
end

test/async/websocket/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
end
3232

3333
describe Async::WebSocket::Client do
34-
with "h1", protocol: Async::HTTP::Protocol::HTTP1 do
34+
with "http/1", protocol: Async::HTTP::Protocol::HTTP1 do
3535
it_behaves_like ClientExamples
3636
end
3737

38-
with "h2", protocol: Async::HTTP::Protocol::HTTP2 do
38+
with "http/2", protocol: Async::HTTP::Protocol::HTTP2 do
3939
it_behaves_like ClientExamples
4040
end
4141
end

test/async/websocket/connection.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
let(:framer) {Protocol::WebSocket::Framer.new(nil)}
1010
let(:connection) {subject.new(framer)}
1111

12+
it "is not reusable" do
13+
expect(connection).not.to be(:reusable?)
14+
end
15+
1216
it "should use mask if specified" do
1317
mock(framer) do |mock|
1418
mock.replace(:write_frame) do |frame|

0 commit comments

Comments
 (0)
0