From b2debfb005cc6d0661b24c50983a885509f7f9c9 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 18 Oct 2012 15:22:58 -0700 Subject: add test for fetch with a block --- actionpack/test/dispatch/header_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/dispatch/header_test.rb') 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"] -- cgit v1.2.3