mirror of https://github.com/rails/rails
Fix status initialization when custom status provided
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
608bf7b72c
commit
a75d21df06
|
@ -44,8 +44,8 @@ module ActionDispatch # :nodoc:
|
|||
@block = nil
|
||||
@length = 0
|
||||
|
||||
@status, @header = status, header
|
||||
self.body = body
|
||||
@header = header
|
||||
self.body, self.status = body, status
|
||||
|
||||
@cookie = []
|
||||
@sending_file = false
|
||||
|
|
|
@ -18,6 +18,10 @@ class ResponseTest < ActiveSupport::TestCase
|
|||
body.each { |part| parts << part }
|
||||
assert_equal ["Hello, World!"], parts
|
||||
end
|
||||
|
||||
test "status handled properly in initialize" do
|
||||
assert_equal 200, ActionDispatch::Response.new('200 OK').status
|
||||
end
|
||||
|
||||
test "utf8 output" do
|
||||
@response.body = [1090, 1077, 1089, 1090].pack("U*")
|
||||
|
|
Loading…
Reference in New Issue