aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/header_test.rb
diff options
context:
space:
mode:
authorMark Turner <mark@amerine.net>2012-05-02 11:14:40 -0700
committerMark Turner <mark@amerine.net>2012-05-02 11:22:34 -0700
commit61ba0fe82c440d244d70afc9aad5c8ea9d6e810d (patch)
tree6978bab90e7eebe138f0ac93ca2d7a2a45e467d1 /actionpack/test/dispatch/header_test.rb
parent6a4541d63e65b1de99bc20c9d260ac13c02fa581 (diff)
downloadrails-61ba0fe82c440d244d70afc9aad5c8ea9d6e810d.tar.gz
rails-61ba0fe82c440d244d70afc9aad5c8ea9d6e810d.tar.bz2
rails-61ba0fe82c440d244d70afc9aad5c8ea9d6e810d.zip
Enable ActionDispatch::Http::Headers to support fetch
Diffstat (limited to 'actionpack/test/dispatch/header_test.rb')
-rw-r--r--actionpack/test/dispatch/header_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/header_test.rb b/actionpack/test/dispatch/header_test.rb
index ec6ba494dc..bc7cad8db5 100644
--- a/actionpack/test/dispatch/header_test.rb
+++ b/actionpack/test/dispatch/header_test.rb
@@ -13,4 +13,9 @@ class HeaderTest < ActiveSupport::TestCase
assert_equal "text/plain", @headers["CONTENT_TYPE"]
assert_equal "text/plain", @headers["HTTP_CONTENT_TYPE"]
end
+
+ test "fetch" do
+ assert_equal "text/plain", @headers.fetch("content-type", nil)
+ assert_equal "not found", @headers.fetch('not-found', 'not found')
+ end
end