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
|
@block = nil
|
||||||
@length = 0
|
@length = 0
|
||||||
|
|
||||||
@status, @header = status, header
|
@header = header
|
||||||
self.body = body
|
self.body, self.status = body, status
|
||||||
|
|
||||||
@cookie = []
|
@cookie = []
|
||||||
@sending_file = false
|
@sending_file = false
|
||||||
|
|
|
@ -18,6 +18,10 @@ class ResponseTest < ActiveSupport::TestCase
|
||||||
body.each { |part| parts << part }
|
body.each { |part| parts << part }
|
||||||
assert_equal ["Hello, World!"], parts
|
assert_equal ["Hello, World!"], parts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "status handled properly in initialize" do
|
||||||
|
assert_equal 200, ActionDispatch::Response.new('200 OK').status
|
||||||
|
end
|
||||||
|
|
||||||
test "utf8 output" do
|
test "utf8 output" do
|
||||||
@response.body = [1090, 1077, 1089, 1090].pack("U*")
|
@response.body = [1090, 1077, 1089, 1090].pack("U*")
|
||||||
|
|
Loading…
Reference in New Issue