diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
commit | e1b255aca456a5b456111b09237805fd32d15111 (patch) | |
tree | a87c8b8989449a9dbdf1c6897901f6957ec021dc /actionpack/test/controller/new_base/content_type_test.rb | |
parent | 60ab54113fa833a1258d687673561b9474964149 (diff) | |
parent | a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 (diff) | |
download | rails-e1b255aca456a5b456111b09237805fd32d15111.tar.gz rails-e1b255aca456a5b456111b09237805fd32d15111.tar.bz2 rails-e1b255aca456a5b456111b09237805fd32d15111.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/controller/new_base/content_type_test.rb')
-rw-r--r-- | actionpack/test/controller/new_base/content_type_test.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/actionpack/test/controller/new_base/content_type_test.rb b/actionpack/test/controller/new_base/content_type_test.rb index 700b71a7f3..33c2e442f0 100644 --- a/actionpack/test/controller/new_base/content_type_test.rb +++ b/actionpack/test/controller/new_base/content_type_test.rb @@ -21,17 +21,11 @@ module ContentType self.view_paths = [ActionView::FixtureResolver.new( "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_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'", + "content_type/implied/i_am_js_rjs.js.rjs" => "page.alert 'hello'" )] - - def i_am_html_erb() end - def i_am_xml_erb() end - def i_am_html_builder() end - def i_am_xml_builder() end end class CharsetController < ActionController::Base @@ -94,10 +88,10 @@ module ContentType 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" + test "sets Content-Type as text/javascript when rendering *.js" do + get "/content_type/implied/i_am_js_rjs", "format" => "js" - assert_header "Content-Type", "text/html; charset=utf-8" + assert_header "Content-Type", "text/javascript; charset=utf-8" end end |