aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r--actionpack/test/controller/new_render_test.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 5463df3c60..b2b40b7636 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -222,6 +222,10 @@ class NewRenderTestController < ActionController::Base
head :x_custom_header => "something"
end
+ def head_with_status_code_first
+ head :forbidden, :x_custom_header => "something"
+ end
+
helper NewRenderTestHelper
helper do
def rjs_helper_method(value)
@@ -656,9 +660,16 @@ EOS
end
end
- def head_with_string_status
+ def test_head_with_string_status
get :head_with_string_status, :status => "404 Eat Dirt"
assert_equal 404, @response.response_code
assert_equal "Eat Dirt", @response.message
end
+
+ def test_head_with_status_code_first
+ get :head_with_status_code_first
+ assert_equal 403, @response.response_code
+ assert_equal "Forbidden", @response.message
+ assert_equal "something", @response.headers["X-Custom-Header"]
+ end
end