Skip to content

Commit 71ddd4c

Browse files
committed
Fix tests (not reading full body).
1 parent 77bd72e commit 71ddd4c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/async/http/faraday/adapter.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def get_response(url = bound_url, path = "/index", adapter_options: {})
156156
with "a post request" do
157157
let(:app) do
158158
Protocol::HTTP::Middleware.for do |request|
159-
Protocol::HTTP::Response[200, {}, [request.body.read]]
159+
Protocol::HTTP::Response[200, {}, [request.read]]
160160
end
161161
end
162162

@@ -277,7 +277,7 @@ def get_response(url = bound_url, path = "/index", adapter_options: {})
277277
content_type = request.headers["content-type"]
278278
boundary = content_type[/boundary=(.+)$/, 1]
279279

280-
body_content = request.body.read
280+
body_content = request.read
281281
readable = StringIO.new(body_content)
282282
parser = Protocol::Multipart::Parser.new(readable, boundary)
283283

0 commit comments

Comments
 (0)