aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index 01151b336b..bc6630a02d 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -478,6 +478,13 @@ class AssertTemplateTest < ActionController::TestCase
end
end
+ def test_fails_expecting_no_layout
+ get :render_with_layout
+ assert_raise(ActiveSupport::TestCase::Assertion) do
+ assert_template :layout => nil
+ end
+ end
+
def test_passes_with_correct_layout
get :render_with_layout
assert_template :layout => "layouts/standard"
@@ -488,6 +495,11 @@ class AssertTemplateTest < ActionController::TestCase
assert_template :layout => "layouts/standard"
end
+ def test_passed_with_no_layout
+ get :hello_world
+ assert_template :layout => nil
+ end
+
def test_assert_template_reset_between_requests
get :hello_world
assert_template 'test/hello_world'