aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-08-14 08:38:35 +0200
committerYves Senn <yves.senn@gmail.com>2014-08-14 08:38:35 +0200
commit9c91c168abeaacc3fc813d1f60b86d615560e266 (patch)
tree77a1cecb9261643b7936464b5d7e37da61a88449 /actionpack/test/controller
parent43ce6e22b19245318ff154f859c82272130ac238 (diff)
parentb1ba333ea72b8aa8fc5ffeda4067c128afb026e4 (diff)
downloadrails-9c91c168abeaacc3fc813d1f60b86d615560e266.tar.gz
rails-9c91c168abeaacc3fc813d1f60b86d615560e266.tar.bz2
rails-9c91c168abeaacc3fc813d1f60b86d615560e266.zip
Merge pull request #16027 from tgxworld/template_assertions
Fixes to ActionController::TemplateAssertions
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index b6b5a218cc..311302819e 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -488,6 +488,11 @@ class AssertTemplateTest < ActionController::TestCase
assert_raise(ActiveSupport::TestCase::Assertion) do
assert_template :file => 'test/hello_world'
end
+
+ get :render_file_absolute_path
+ assert_raise(ActiveSupport::TestCase::Assertion) do
+ assert_template file: nil
+ end
end
def test_with_nil_passes_when_no_template_rendered
@@ -612,6 +617,24 @@ class AssertTemplateTest < ActionController::TestCase
get :nothing
assert_template nil
+
+ get :partial
+ assert_template partial: 'test/_partial'
+
+ get :nothing
+ assert_template partial: nil
+
+ get :render_with_layout
+ assert_template layout: 'layouts/standard'
+
+ get :nothing
+ assert_template layout: nil
+
+ get :render_file_relative_path
+ assert_template file: 'README.rdoc'
+
+ get :nothing
+ assert_template file: nil
end
end