diff options
author | Maxim Chernyak <max@bitsonnet.com> | 2010-09-18 04:08:48 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-18 20:49:51 +0200 |
commit | 20685d07ab5853457e1d11467f22ed42568e20f4 (patch) | |
tree | e8bebc097c3d45e15223d73c21f621a998c7b3f1 /actionpack/test/controller | |
parent | 154081f0f74988bdb8979f0447ff5816ab83d8fd (diff) | |
download | rails-20685d07ab5853457e1d11467f22ed42568e20f4.tar.gz rails-20685d07ab5853457e1d11467f22ed42568e20f4.tar.bz2 rails-20685d07ab5853457e1d11467f22ed42568e20f4.zip |
Fix header capitalization by explicitly upcasing first letter of every word, and avoiding capitalize. [#5636 state:resolved]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index ab12c0bf17..42723c834e 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -488,6 +488,10 @@ class TestController < ActionController::Base head :x_custom_header => "something" end + def head_with_www_authenticate_header + head 'WWW-Authenticate' => 'something' + end + def head_with_status_code_first head :forbidden, :x_custom_header => "something" end @@ -1139,6 +1143,13 @@ class RenderTest < ActionController::TestCase assert_response :ok end + def test_head_with_www_authenticate_header + get :head_with_www_authenticate_header + assert_blank @response.body + assert_equal "something", @response.headers["WWW-Authenticate"] + assert_response :ok + end + def test_head_with_symbolic_status get :head_with_symbolic_status, :status => "ok" assert_equal 200, @response.status |