mirror of
https://github.com/lostisland/faraday.git
synced 2025-12-04 00:03:34 -05:00
Merge pull request #231 from lucasmazza/struct-members
Convert Env keys to symbols
This commit is contained in:
commit
b9e89c7562
@ -67,7 +67,7 @@ module Faraday
|
||||
hash = {}
|
||||
members.each do |key|
|
||||
value = send(key)
|
||||
hash[key] = value if value
|
||||
hash[key.to_sym] = value if value
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
@ -184,6 +184,9 @@ class ResponseTest < Faraday::TestCase
|
||||
hash = @response.to_hash
|
||||
assert_kind_of Hash, hash
|
||||
assert_equal @env.to_hash, hash
|
||||
assert_equal hash[:status], @response.status
|
||||
assert_equal hash[:response_headers], @response.headers
|
||||
assert_equal hash[:body], @response.body
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user