aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-05-28 09:23:51 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-05-28 09:23:51 -0300
commit172e452e0a0147701d08b85573fbabe22f2d9274 (patch)
treedf1d43df102bb584ac8a10891cb546862516b403 /actionpack/test/controller/render_test.rb
parent207f8fc7debec1e9173f797e5208527e97235af3 (diff)
parent44781b6e9790d90b4f8b9a41d2b2c114b1a582ee (diff)
downloadrails-172e452e0a0147701d08b85573fbabe22f2d9274.tar.gz
rails-172e452e0a0147701d08b85573fbabe22f2d9274.tar.bz2
rails-172e452e0a0147701d08b85573fbabe22f2d9274.zip
Merge pull request #20336 from vngrs/deprecate_nothing_option_for_render_method
Deprecate `:nothing` option for render method
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 79e2104789..cabacad940 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -120,6 +120,10 @@ class TestController < ActionController::Base
render :action => 'hello_world'
end
+ def respond_with_empty_body
+ render nothing: true
+ end
+
def conditional_hello_with_bangs
render :action => 'hello_world'
end
@@ -270,6 +274,12 @@ class ExpiresInRenderTest < ActionController::TestCase
assert_match(/no-transform/, @response.headers["Cache-Control"])
end
+ def test_render_nothing_deprecated
+ assert_deprecated do
+ get :respond_with_empty_body
+ end
+ end
+
def test_date_header_when_expires_in
time = Time.mktime(2011,10,30)
Time.stubs(:now).returns(time)