summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 11:09:44 (GMT)
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 11:09:44 (GMT)
commit1a98f56ae14724611fc8f7c220e470d27f6b57e4 (patch)
tree470be2c0e8f9e42f1a60d636e6a36293b63bf3b4 /test
parent1a18454da9bd4be564cf5df21dc2b53787527168 (diff)
* lib/net/http/header.rb: pass header names as symbols.
Patch by @DamirSvrtan [fix GH-805] * test/net/http/test_httpheader.rb: added test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/net/http/test_httpheader.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/net/http/test_httpheader.rb b/test/net/http/test_httpheader.rb
index 0623871..224d8bb 100644
--- a/test/net/http/test_httpheader.rb
+++ b/test/net/http/test_httpheader.rb
@@ -142,6 +142,14 @@ class HTTPHeaderTest < Test::Unit::TestCase
end
end
+ def test_each_capitalized_with_symbol
+ @c[:my_header] = ['a', 'b']
+ @c.each_capitalized do |k,v|
+ assert_equal "My_header", k
+ assert_equal 'a, b', v
+ end
+ end
+
def test_key?
@c['My-Header'] = 'test'
assert_equal true, @c.key?('My-Header')