diff options
author | Carsten Wirth <carsten.wirth@blacklane.com> | 2014-12-16 19:30:52 +0100 |
---|---|---|
committer | Carsten Wirth <carsten.wirth@blacklane.com> | 2014-12-16 19:30:52 +0100 |
commit | 7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4 (patch) | |
tree | 68c0771df4dbcd30978fecf9014a87803b33e8a3 /actionpack/test/controller | |
parent | 81e940c313b6924915ca77a0f3af66332c9f0b1f (diff) | |
download | rails-7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4.tar.gz rails-7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4.tar.bz2 rails-7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4.zip |
adding that assert_template with :layout will raise ArgumentError for unknown layout type
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index f2a4503f13..d0dfbfbc74 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -575,6 +575,13 @@ class AssertTemplateTest < ActionController::TestCase end end + def test_fails_expecting_not_known_layout + get :render_with_layout + assert_raise(ArgumentError) do + assert_template :layout => 1 + end + end + def test_passes_with_correct_layout get :render_with_layout assert_template :layout => "layouts/standard" |