diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-08 20:30:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-08 20:30:24 +0000 |
commit | 7ea86773a915ef8bebf1e23c3eed3a8b374d21b3 (patch) | |
tree | e3b0052c07d442eb7b3062136500774f8b035ce2 /actionpack/test | |
parent | 8ba8c7c560397b783743a662789fedcf85855ce2 (diff) | |
download | rails-7ea86773a915ef8bebf1e23c3eed3a8b374d21b3.tar.gz rails-7ea86773a915ef8bebf1e23c3eed3a8b374d21b3.tar.bz2 rails-7ea86773a915ef8bebf1e23c3eed3a8b374d21b3.zip |
r5515@ks: jeremy | 2006-10-08 13:24:42 -0700
#6281
r5516@ks: jeremy | 2006-10-08 13:29:49 -0700
respond_to :html doesn't assume .rhtml. Closes #6281.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/mime_responds_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 9118d9e553..d2cb4f1d84 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -303,4 +303,21 @@ class MimeControllerTest < Test::Unit::TestCase get :html_xml_or_rss, :format => "rss" assert_equal "RSS", @response.body end + + def test_render_action_for_html + @controller.instance_eval do + def render(*args) + unless args.empty? + @action = args.first[:action] + end + response.body = @action + end + end + + get :using_defaults + assert_equal "using_defaults", @response.body + + get :using_defaults, :format => "xml" + assert_equal "using_defaults.rxml", @response.body + end end |