aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorCarsten Wirth <carsten.wirth@blacklane.com>2014-12-16 19:30:52 +0100
committerCarsten Wirth <carsten.wirth@blacklane.com>2014-12-16 19:30:52 +0100
commit7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4 (patch)
tree68c0771df4dbcd30978fecf9014a87803b33e8a3 /actionpack/test/controller
parent81e940c313b6924915ca77a0f3af66332c9f0b1f (diff)
downloadrails-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.rb7
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"