Skip to content

Commit 99294c5

Browse files
committed
Test coverage.
1 parent 3356de8 commit 99294c5

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

test/protocol/http/body/deflate.rb

+12
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@
4444
expect(decompressed_body.read).to be == nil
4545
end
4646

47+
with "#length" do
48+
it "should be unknown" do
49+
expect(compressed_body).to have_attributes(
50+
length: be_nil,
51+
)
52+
53+
expect(decompressed_body).to have_attributes(
54+
length: be_nil,
55+
)
56+
end
57+
end
58+
4759
with "#inspect" do
4860
it "can generate string representation" do
4961
expect(compressed_body.inspect).to be == "#<Protocol::HTTP::Body::Buffered 0 chunks, 0 bytes> | #<Protocol::HTTP::Body::Deflate 100.0%>"

test/protocol/http/body/readable.rb

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
expect(body).not.to be(:ready?)
1818
end
1919

20+
with "#buffered" do
21+
it "is unable to buffer by default" do
22+
expect(body.buffered).to be_nil
23+
end
24+
end
25+
2026
with "#finish" do
2127
it "should return empty buffered representation" do
2228
expect(body.finish).to be(:empty?)

test/protocol/http/request.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
version: be == "HTTP/1.0",
7575
headers: be == headers,
7676
body: be == body,
77-
protocol: be_nil
77+
protocol: be_nil,
78+
peer: be_nil,
7879
)
7980
end
8081

test/protocol/http/response.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@
172172
status: be == 200,
173173
headers: be == headers,
174174
body: be == body,
175-
protocol: be == nil
175+
protocol: be_nil,
176+
peer: be_nil,
176177
)
177178
end
178179

0 commit comments

Comments
 (0)