diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 18:35:38 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 18:35:38 -0200 |
commit | e745ae297fb803b150e3e129e2c6e34c4d31f73a (patch) | |
tree | cde889bff5b9f17bc554b8cddf4c555e5ee495b5 /actionpack/test/controller/action_pack_assertions_test.rb | |
parent | e91b182b96beaf7ca39352dc99bc250e023c2c9a (diff) | |
parent | 7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4 (diff) | |
download | rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.tar.gz rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.tar.bz2 rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.zip |
Merge pull request #17995 from jethroo/fix/assert_template_with_unsupported_layout_type
assert template should raise ArgumentError for unsupported layout types
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-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" |