提交 ec030534 编写于 作者: R Rick Olson

test default content type for implicit rjs template render

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 8f2221da
......@@ -25,6 +25,9 @@ def render_default_for_rhtml
def render_default_for_rxml
end
def render_default_for_rjs
end
def render_change_for_rxml
response.content_type = Mime::HTML
render :action => "render_default_for_rxml"
......@@ -100,6 +103,12 @@ def test_default_for_rxml
assert_equal "utf-8", @response.charset
end
def test_default_for_rjs
xhr :post, :render_default_for_rjs
assert_equal Mime::JS, @response.content_type
assert_equal "utf-8", @response.charset
end
def test_change_for_rxml
get :render_change_for_rxml
assert_equal Mime::HTML, @response.content_type
......
page.alert 'hello world!'
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册