diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-04-11 11:55:51 +0600 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-05-04 23:31:05 +0400 |
commit | 4bd05a7bdc5003c9ebb090dcb0dc4949e4fb8ad3 (patch) | |
tree | 31f9341dc568052b867f2033a3d9e30d3538b2ec /actionpack/test | |
parent | df36c5f7ffd2657e11eea4e407401c9ff2aa0533 (diff) | |
download | rails-4bd05a7bdc5003c9ebb090dcb0dc4949e4fb8ad3.tar.gz rails-4bd05a7bdc5003c9ebb090dcb0dc4949e4fb8ad3.tar.bz2 rails-4bd05a7bdc5003c9ebb090dcb0dc4949e4fb8ad3.zip |
Fix assert_template :layout => nil assertion
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 12 |
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' |