diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
commit | cf6e025a4538e488ed35f61f1f7f3498833a34e6 (patch) | |
tree | 6a28d5beac35e74a33243668baf7a9a60edf6724 /actionpack/test/controller/action_pack_assertions_test.rb | |
parent | 628110d7eeb446fee7f9e043f113c083d24883c1 (diff) | |
parent | 195fadbfd31294d43634afb7bbf4f0ffc86b470a (diff) | |
download | rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.gz rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.bz2 rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 484d3c5ce7..c3c769919a 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -12,6 +12,9 @@ class ActionPackAssertionsController < ActionController::Base # a standard template def hello_xml_world() render :template => "test/hello_xml_world"; end + # a standard partial + def partial() render :partial => 'test/partial'; end + # a redirect to an internal location def redirect_internal() redirect_to "/nothing"; end @@ -331,6 +334,26 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase end end + def test_assert_template_with_partial + get :partial + assert_template :partial => '_partial' + end + + def test_assert_template_with_nil + get :nothing + assert_template nil + end + + def test_assert_template_with_string + get :hello_world + assert_template 'hello_world' + end + + def test_assert_template_with_symbol + get :hello_world + assert_template :hello_world + end + # check if we were rendered by a file-based template? def test_rendered_action process :nothing |