diff options
author | Matthew Draper <matthew@trebex.net> | 2015-07-18 12:42:08 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-07-18 12:42:08 +0930 |
commit | e78746fefdd1c5528a10ca23a5f40804ef855086 (patch) | |
tree | deae317ebeca2cb20b57e9ad9a8c0c36720c8d7f /actionpack/test/controller/integration_test.rb | |
parent | 0db98b3ec8226042a5c3400d594d803abb5b169f (diff) | |
parent | 8cb8ce98d903929342e2ca3a54a07ab5196baf93 (diff) | |
download | rails-e78746fefdd1c5528a10ca23a5f40804ef855086.tar.gz rails-e78746fefdd1c5528a10ca23a5f40804ef855086.tar.bz2 rails-e78746fefdd1c5528a10ca23a5f40804ef855086.zip |
Merge pull request #20923 from sikachu/silence-render-text-warning
Stop using deprecated `render :text` in test
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index a6460168cb..0b9be8d671 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -359,28 +359,28 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest class IntegrationController < ActionController::Base def get respond_to do |format| - format.html { render :text => "OK", :status => 200 } - format.js { render :text => "JS OK", :status => 200 } + format.html { render plain: "OK", status: 200 } + format.js { render plain: "JS OK", status: 200 } format.xml { render :xml => "<root></root>", :status => 200 } end end def get_with_params - render :text => "foo: #{params[:foo]}", :status => 200 + render plain: "foo: #{params[:foo]}", status: 200 end def post - render :text => "Created", :status => 201 + render plain: "Created", status: 201 end def method - render :text => "method: #{request.method.downcase}" + render plain: "method: #{request.method.downcase}" end def cookie_monster cookies["cookie_1"] = nil cookies["cookie_3"] = "chocolate" - render :text => "Gone", :status => 410 + render plain: "Gone", status: 410 end def set_cookie @@ -389,7 +389,7 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest end def get_cookie - render :text => cookies["foo"] + render plain: cookies["foo"] end def redirect @@ -760,7 +760,7 @@ end class ApplicationIntegrationTest < ActionDispatch::IntegrationTest class TestController < ActionController::Base def index - render :text => "index" + render plain: "index" end end @@ -847,7 +847,7 @@ end class EnvironmentFilterIntegrationTest < ActionDispatch::IntegrationTest class TestController < ActionController::Base def post - render :text => "Created", :status => 201 + render plain: "Created", status: 201 end end @@ -880,15 +880,15 @@ end class UrlOptionsIntegrationTest < ActionDispatch::IntegrationTest class FooController < ActionController::Base def index - render :text => "foo#index" + render plain: "foo#index" end def show - render :text => "foo#show" + render plain: "foo#show" end def edit - render :text => "foo#show" + render plain: "foo#show" end end @@ -898,7 +898,7 @@ class UrlOptionsIntegrationTest < ActionDispatch::IntegrationTest end def index - render :text => "foo#index" + render plain: "foo#index" end end |