Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit ec030534b1d4786cc953ee95c912a72f650f5338 1 parent 8f2221d
@technoweenie technoweenie authored
View
9 actionpack/test/controller/content_type_test.rb
@@ -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
View
1  actionpack/test/fixtures/content_type/render_default_for_rjs.rjs
@@ -0,0 +1 @@
+page.alert 'hello world!'
Please sign in to comment.
Something went wrong with that request. Please try again.