diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-10-08 22:22:47 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@garaio.com> | 2012-10-11 08:46:49 +0200 |
commit | ed9567401dfc7b476bf9ccac82826fc63283f708 (patch) | |
tree | 4e9da4c25d623281aff8438a65934cd3526834a3 /actionpack/test/template | |
parent | cd98c25ebedc27fe892468bb87ea260fb070f5eb (diff) | |
download | rails-ed9567401dfc7b476bf9ccac82826fc63283f708.tar.gz rails-ed9567401dfc7b476bf9ccac82826fc63283f708.tar.bz2 rails-ed9567401dfc7b476bf9ccac82826fc63283f708.zip |
recognizes when a partial was rendered twice. Closes #3675
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/test_case_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb index 5265ae6b3a..c7231d9cd5 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionpack/test/template/test_case_test.rb @@ -321,6 +321,14 @@ module ActionView assert_template :partial => "_partial_for_use_in_layout", :locals => { :name => "Somebody Else" } end end + + test 'supports different locals on the same partial' do + controller.controller_path = "test" + render(:template => "test/render_two_partials") + assert_template partial: '_partial', locals: { 'first' => '1' } + assert_template partial: '_partial', locals: { 'second' => '2' } + end + end module AHelperWithInitialize |