diff options
author | Prem Sichanugrist <s@sikac.hu> | 2015-07-17 21:48:00 -0400 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2015-07-17 22:27:33 -0400 |
commit | 8cb8ce98d903929342e2ca3a54a07ab5196baf93 (patch) | |
tree | deae317ebeca2cb20b57e9ad9a8c0c36720c8d7f /actionpack/test/dispatch/session | |
parent | 0db98b3ec8226042a5c3400d594d803abb5b169f (diff) | |
download | rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.tar.gz rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.tar.bz2 rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.zip |
Stop using deprecated `render :text` in test
This will silence deprecation warnings.
Most of the test can be changed from `render :text` to render `:plain`
or `render :body` right away. However, there are some tests that needed
to be fixed by hand as they actually assert the default Content-Type
returned from `render :body`.
Diffstat (limited to 'actionpack/test/dispatch/session')
-rw-r--r-- | actionpack/test/dispatch/session/cache_store_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/session/cookie_store_test.rb | 10 | ||||
-rw-r--r-- | actionpack/test/dispatch/session/mem_cache_store_test.rb | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/session/cache_store_test.rb b/actionpack/test/dispatch/session/cache_store_test.rb index 22a46b0930..e6a70358c8 100644 --- a/actionpack/test/dispatch/session/cache_store_test.rb +++ b/actionpack/test/dispatch/session/cache_store_test.rb @@ -18,11 +18,11 @@ class CacheStoreTest < ActionDispatch::IntegrationTest end def get_session_value - render :text => "foo: #{session[:foo].inspect}" + render plain: "foo: #{session[:foo].inspect}" end def get_session_id - render :text => "#{request.session.id}" + render plain: "#{request.session.id}" end def call_reset_session diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb index e7f4235de8..715eb90566 100644 --- a/actionpack/test/dispatch/session/cookie_store_test.rb +++ b/actionpack/test/dispatch/session/cookie_store_test.rb @@ -16,25 +16,25 @@ class CookieStoreTest < ActionDispatch::IntegrationTest end def persistent_session_id - render :text => session[:session_id] + render plain: session[:session_id] end def set_session_value session[:foo] = "bar" - render :text => Rack::Utils.escape(Verifier.generate(session.to_hash)) + render plain: Rack::Utils.escape(Verifier.generate(session.to_hash)) end def get_session_value - render :text => "foo: #{session[:foo].inspect}" + render plain: "foo: #{session[:foo].inspect}" end def get_session_id - render :text => "id: #{request.session.id}" + render plain: "id: #{request.session.id}" end def get_class_after_reset_session reset_session - render :text => "class: #{session.class}" + render plain: "class: #{session.class}" end def call_session_clear diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb index 9a5d5131c0..6e9107ecbf 100644 --- a/actionpack/test/dispatch/session/mem_cache_store_test.rb +++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb @@ -19,11 +19,11 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest end def get_session_value - render :text => "foo: #{session[:foo].inspect}" + render plain: "foo: #{session[:foo].inspect}" end def get_session_id - render :text => "#{request.session.id}" + render plain: "#{request.session.id}" end def call_reset_session |