Skip to content
Browse files

Revert "Add test case which check content type when rendering rjs" pa…

…rtial in html template" rendering rjs in html doesn't make sense, it would just output javascript into the template, no script tag

This reverts commit dc25138.
  • Loading branch information...
1 parent 8a91ccf commit 462a7b45f6b72865a3d2d9411083512c6e1c1a66 @spastorino spastorino committed Apr 15, 2010
Showing with 1 addition and 9 deletions.
  1. +1 −9 actionpack/test/controller/new_base/content_type_test.rb
View
10 actionpack/test/controller/new_base/content_type_test.rb
@@ -23,9 +23,7 @@ class ImpliedController < ActionController::Base
"content_type/implied/i_am_html_erb.html.erb" => "Hello world!",
"content_type/implied/i_am_xml_erb.xml.erb" => "<xml>Hello world!</xml>",
"content_type/implied/i_am_html_builder.html.builder" => "xml.p 'Hello'",
- "content_type/implied/i_am_xml_builder.xml.builder" => "xml.awesome 'Hello'",
- "content_type/implied/i_am_rjs_in_html.html.erb" => "<%= render 'i_am_rjs_partial' %>",
- "content_type/implied/_i_am_rjs_partial.js.rjs" => ""
+ "content_type/implied/i_am_xml_builder.xml.builder" => "xml.awesome 'Hello'"
)]
def i_am_html_erb() end
@@ -93,12 +91,6 @@ class ImpliedContentTypeTest < Rack::TestCase
assert_header "Content-Type", "application/xml; charset=utf-8"
end
-
- test "sets Content-Type as text/html when rendering *.html.erb with a RJS partial" do
- get "/content_type/implied/i_am_rjs_in_html"
-
- assert_header "Content-Type", "text/html; charset=utf-8"
- end
end
class ExplicitCharsetTest < Rack::TestCase

1 comment on commit 462a7b4

@wycats
Ruby on Rails member
wycats commented on 462a7b4 Apr 16, 2010

I'm not quite sure about the rationale for this revert, but if you want this behavior, the correct way is render "i_am_rjs_partial.js"

Please sign in to comment.
Something went wrong with that request. Please try again.