@@ -229,14 +229,6 @@ def test_body_stream
229229 assert_equal params . to_query , @response . body
230230 end
231231
232- def test_deprecated_body_stream
233- params = Hash [ :page , { name : "page name" } , "some key" , 123 ]
234-
235- assert_deprecated { post :render_body , params . dup }
236-
237- assert_equal params . to_query , @response . body
238- end
239-
240232 def test_document_body_and_params_with_post
241233 post :test_params , params : { id : 1 }
242234 assert_equal ( { "id" => "1" , "controller" => "test_case_test/test" , "action" => "test_params" } , ::JSON . parse ( @response . body ) )
@@ -247,21 +239,11 @@ def test_document_body_with_post
247239 assert_equal "document body" , @response . body
248240 end
249241
250- def test_deprecated_document_body_with_post
251- assert_deprecated { post :render_body , "document body" }
252- assert_equal "document body" , @response . body
253- end
254-
255242 def test_document_body_with_put
256243 put :render_body , body : "document body"
257244 assert_equal "document body" , @response . body
258245 end
259246
260- def test_deprecated_document_body_with_put
261- assert_deprecated { put :render_body , "document body" }
262- assert_equal "document body" , @response . body
263- end
264-
265247 def test_head
266248 head :test_params
267249 assert_equal 200 , @response . status
@@ -272,23 +254,13 @@ def test_process_without_flash
272254 assert_equal "><" , flash [ "test" ]
273255 end
274256
275- def test_deprecated_process_with_flash
276- assert_deprecated { process :set_flash , "GET" , nil , nil , "test" => "value" }
277- assert_equal ">value<" , flash [ "test" ]
278- end
279-
280257 def test_process_with_flash
281258 process :set_flash ,
282259 method : "GET" ,
283260 flash : { "test" => "value" }
284261 assert_equal ">value<" , flash [ "test" ]
285262 end
286263
287- def test_deprecated_process_with_flash_now
288- assert_deprecated { process :set_flash_now , "GET" , nil , nil , "test_now" => "value_now" }
289- assert_equal ">value_now<" , flash [ "test_now" ]
290- end
291-
292264 def test_process_with_flash_now
293265 process :set_flash_now ,
294266 method : "GET" ,
@@ -311,14 +283,6 @@ def test_process_with_session
311283 assert_equal "it works" , session [ :symbol ] , "Test session hash should allow indifferent access"
312284 end
313285
314- def test_process_with_session_arg
315- assert_deprecated { process :no_op , "GET" , nil , "string" => "value1" , symbol : "value2" }
316- assert_equal "value1" , session [ "string" ]
317- assert_equal "value1" , session [ :string ]
318- assert_equal "value2" , session [ "symbol" ]
319- assert_equal "value2" , session [ :symbol ]
320- end
321-
322286 def test_process_with_session_kwarg
323287 process :no_op , method : "GET" , session : { "string" => "value1" , symbol : "value2" }
324288 assert_equal "value1" , session [ "string" ]
@@ -327,31 +291,13 @@ def test_process_with_session_kwarg
327291 assert_equal "value2" , session [ :symbol ]
328292 end
329293
330- def test_deprecated_process_merges_session_arg
331- session [ :foo ] = "bar"
332- assert_deprecated {
333- get :no_op , nil , bar : "baz"
334- }
335- assert_equal "bar" , session [ :foo ]
336- assert_equal "baz" , session [ :bar ]
337- end
338-
339294 def test_process_merges_session_arg
340295 session [ :foo ] = "bar"
341296 get :no_op , session : { bar : "baz" }
342297 assert_equal "bar" , session [ :foo ]
343298 assert_equal "baz" , session [ :bar ]
344299 end
345300
346- def test_deprecated_merged_session_arg_is_retained_across_requests
347- assert_deprecated {
348- get :no_op , nil , foo : "bar"
349- }
350- assert_equal "bar" , session [ :foo ]
351- get :no_op
352- assert_equal "bar" , session [ :foo ]
353- end
354-
355301 def test_merged_session_arg_is_retained_across_requests
356302 get :no_op , session : { foo : "bar" }
357303 assert_equal "bar" , session [ :foo ]
@@ -393,11 +339,6 @@ def test_process_with_symbol_method
393339 assert_equal "/test_case_test/test/test_uri" , @response . body
394340 end
395341
396- def test_deprecated_process_with_request_uri_with_params
397- assert_deprecated { process :test_uri , "GET" , id : 7 }
398- assert_equal "/test_case_test/test/test_uri/7" , @response . body
399- end
400-
401342 def test_process_with_request_uri_with_params
402343 process :test_uri ,
403344 method : "GET" ,
@@ -406,12 +347,6 @@ def test_process_with_request_uri_with_params
406347 assert_equal "/test_case_test/test/test_uri/7" , @response . body
407348 end
408349
409- def test_deprecated_process_with_request_uri_with_params_with_explicit_uri
410- @request . env [ "PATH_INFO" ] = "/explicit/uri"
411- assert_deprecated { process :test_uri , "GET" , id : 7 }
412- assert_equal "/explicit/uri" , @response . body
413- end
414-
415350 def test_process_with_request_uri_with_params_with_explicit_uri
416351 @request . env [ "PATH_INFO" ] = "/explicit/uri"
417352 process :test_uri , method : "GET" , params : { id : 7 }
@@ -491,20 +426,6 @@ def test_assert_routing_with_glob
491426 end
492427 end
493428
494- def test_deprecated_params_passing
495- assert_deprecated {
496- get :test_params , page : { name : "Page name" , month : "4" , year : "2004" , day : "6" }
497- }
498- parsed_params = ::JSON . parse ( @response . body )
499- assert_equal (
500- {
501- "controller" => "test_case_test/test" , "action" => "test_params" ,
502- "page" => { "name" => "Page name" , "month" => "4" , "year" => "2004" , "day" => "6" }
503- } ,
504- parsed_params
505- )
506- end
507-
508429 def test_params_passing
509430 get :test_params , params : {
510431 page : {
@@ -589,16 +510,6 @@ def test_params_passing_path_parameter_is_string_when_not_html_request
589510 )
590511 end
591512
592- def test_deprecated_params_passing_path_parameter_is_string_when_not_html_request
593- assert_deprecated { get :test_params , format : "json" , id : 1 }
594- parsed_params = ::JSON . parse ( @response . body )
595- assert_equal (
596- { "controller" => "test_case_test/test" , "action" => "test_params" ,
597- "format" => "json" , "id" => "1" } ,
598- parsed_params
599- )
600- end
601-
602513 def test_params_passing_with_frozen_values
603514 assert_nothing_raised do
604515 get :test_params , params : {
@@ -683,11 +594,6 @@ def test_id_converted_to_string
683594 assert_kind_of String , @request . path_parameters [ :id ]
684595 end
685596
686- def test_deprecared_id_converted_to_string
687- assert_deprecated { get :test_params , id : 20 , foo : Object . new }
688- assert_kind_of String , @request . path_parameters [ :id ]
689- end
690-
691597 def test_array_path_parameter_handled_properly
692598 with_routing do |set |
693599 set . draw do
@@ -757,14 +663,6 @@ def test_xhr_with_session
757663 assert_equal "it works" , session [ :symbol ] , "Test session hash should allow indifferent access"
758664 end
759665
760- def test_deprecated_params_reset_between_post_requests
761- assert_deprecated { post :no_op , foo : "bar" }
762- assert_equal "bar" , @request . params [ :foo ]
763-
764- post :no_op
765- assert @request . params [ :foo ] . blank?
766- end
767-
768666 def test_params_reset_between_post_requests
769667 post :no_op , params : { foo : "bar" }
770668 assert_equal "bar" , @request . params [ :foo ]
@@ -964,15 +862,6 @@ def test_fixture_file_upload_ignores_nil_fixture_path
964862 assert_equal File . open ( "#{ FILES_DIR } /mona_lisa.jpg" , READ_PLAIN ) . read , uploaded_file . read
965863 end
966864
967- def test_deprecated_action_dispatch_uploaded_file_upload
968- filename = "mona_lisa.jpg"
969- path = "#{ FILES_DIR } /#{ filename } "
970- assert_deprecated {
971- post :test_file_upload , file : Rack ::Test ::UploadedFile . new ( path , "image/jpg" , true )
972- }
973- assert_equal "159528" , @response . body
974- end
975-
976865 def test_action_dispatch_uploaded_file_upload
977866 filename = "mona_lisa.jpg"
978867 path = "#{ FILES_DIR } /#{ filename } "
0 commit comments