Sha256: 77906b72867e65b66a07c3e221cc37d08b623614db48f087a66f520ad6650b78
Contents?: true
Size: 1.33 KB
Versions: 20
Compression:
Stored size: 1.33 KB
Contents
Shindo.tests('Excon response header support') do env_init with_rackup('response_header.ru') do tests('Response#get_header') do connection = Excon.new('http://foo.com:8080', :proxy => 'http://127.0.0.1:9292') response = connection.request(:method => :get, :path => '/foo') tests('with variable header capitalization') do tests('response.get_header("mixedcase-header")').returns('MixedCase') do response.get_header("mixedcase-header") end tests('response.get_header("uppercase-header")').returns('UPPERCASE') do response.get_header("uppercase-header") end tests('response.get_header("lowercase-header")').returns('lowercase') do response.get_header("lowercase-header") end end tests('when provided key capitalization varies') do tests('response.get_header("MIXEDCASE-HEADER")').returns('MixedCase') do response.get_header("MIXEDCASE-HEADER") end tests('response.get_header("MiXeDcAsE-hEaDeR")').returns('MixedCase') do response.get_header("MiXeDcAsE-hEaDeR") end end tests('when header is unavailable') do tests('response.get_header("missing")').returns(nil) do response.get_header("missing") end end end end env_restore end
Version data entries
20 entries across 20 versions & 1 rubygems