diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-10-18 15:22:58 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-10-18 15:22:58 -0700 |
commit | b2debfb005cc6d0661b24c50983a885509f7f9c9 (patch) | |
tree | db58e0c6b95dcfd6bb208e76fc5997bf6fefb360 /actionpack/test/dispatch | |
parent | 6ea781c9a7913ddf75ecdb26a273e194df95b2dc (diff) | |
download | rails-b2debfb005cc6d0661b24c50983a885509f7f9c9.tar.gz rails-b2debfb005cc6d0661b24c50983a885509f7f9c9.tar.bz2 rails-b2debfb005cc6d0661b24c50983a885509f7f9c9.zip |
add test for fetch with a block
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/header_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/header_test.rb b/actionpack/test/dispatch/header_test.rb index 4c06200a88..42432510c3 100644 --- a/actionpack/test/dispatch/header_test.rb +++ b/actionpack/test/dispatch/header_test.rb @@ -23,6 +23,10 @@ class HeaderTest < ActiveSupport::TestCase assert @headers.include?('HTTP_CONTENT_TYPE') end + def test_fetch_with_block + assert_equal 'omg', @headers.fetch('notthere') { 'omg' } + end + test "content type" do assert_equal "text/plain", @headers["Content-Type"] assert_equal "text/plain", @headers["content-type"] |