diff options
author | Tim Haines <tmhaines@gmail.com> | 2008-07-02 04:26:34 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-07-02 04:30:34 +0100 |
commit | f5052dd8a39099e4930faafe9b01e63ced2f6391 (patch) | |
tree | b822185ee19ee7cec9a0e7e8bccc81f4108bc6d5 /actionpack/test | |
parent | aff2d331720a3143914a0fffd1eba613dc333bfc (diff) | |
download | rails-f5052dd8a39099e4930faafe9b01e63ced2f6391.tar.gz rails-f5052dd8a39099e4930faafe9b01e63ced2f6391.tar.bz2 rails-f5052dd8a39099e4930faafe9b01e63ced2f6391.zip |
Make sure render :template works with :locals. [#524 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index deda47f352..eac36a04cb 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -268,6 +268,10 @@ class NewRenderTestController < ActionController::Base render :template => "test/hello_world" end + def render_with_explicit_template_with_locals + render :template => "test/render_file_with_locals", :locals => { :secret => 'area51' } + end + def double_render render :text => "hello" render :text => "world" @@ -820,6 +824,11 @@ EOS assert_equal "world", assigns["hello"] end + def test_template_with_locals + get :render_with_explicit_template_with_locals + assert_equal "The secret is area51\n", @response.body + end + def test_update_page get :update_page assert_template nil |