From 7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4 Mon Sep 17 00:00:00 2001 From: Carsten Wirth Date: Tue, 16 Dec 2014 19:30:52 +0100 Subject: adding that assert_template with :layout will raise ArgumentError for unknown layout type --- actionpack/test/controller/action_pack_assertions_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/controller') 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" -- cgit v1.2.3