@@ -229,14 +229,6 @@ def test_body_stream
229
229
assert_equal params . to_query , @response . body
230
230
end
231
231
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
-
240
232
def test_document_body_and_params_with_post
241
233
post :test_params , params : { id : 1 }
242
234
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
247
239
assert_equal "document body" , @response . body
248
240
end
249
241
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
-
255
242
def test_document_body_with_put
256
243
put :render_body , body : "document body"
257
244
assert_equal "document body" , @response . body
258
245
end
259
246
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
-
265
247
def test_head
266
248
head :test_params
267
249
assert_equal 200 , @response . status
@@ -272,23 +254,13 @@ def test_process_without_flash
272
254
assert_equal "><" , flash [ "test" ]
273
255
end
274
256
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
-
280
257
def test_process_with_flash
281
258
process :set_flash ,
282
259
method : "GET" ,
283
260
flash : { "test" => "value" }
284
261
assert_equal ">value<" , flash [ "test" ]
285
262
end
286
263
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
-
292
264
def test_process_with_flash_now
293
265
process :set_flash_now ,
294
266
method : "GET" ,
@@ -311,14 +283,6 @@ def test_process_with_session
311
283
assert_equal "it works" , session [ :symbol ] , "Test session hash should allow indifferent access"
312
284
end
313
285
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
-
322
286
def test_process_with_session_kwarg
323
287
process :no_op , method : "GET" , session : { "string" => "value1" , symbol : "value2" }
324
288
assert_equal "value1" , session [ "string" ]
@@ -327,31 +291,13 @@ def test_process_with_session_kwarg
327
291
assert_equal "value2" , session [ :symbol ]
328
292
end
329
293
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
-
339
294
def test_process_merges_session_arg
340
295
session [ :foo ] = "bar"
341
296
get :no_op , session : { bar : "baz" }
342
297
assert_equal "bar" , session [ :foo ]
343
298
assert_equal "baz" , session [ :bar ]
344
299
end
345
300
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
-
355
301
def test_merged_session_arg_is_retained_across_requests
356
302
get :no_op , session : { foo : "bar" }
357
303
assert_equal "bar" , session [ :foo ]
@@ -393,11 +339,6 @@ def test_process_with_symbol_method
393
339
assert_equal "/test_case_test/test/test_uri" , @response . body
394
340
end
395
341
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
-
401
342
def test_process_with_request_uri_with_params
402
343
process :test_uri ,
403
344
method : "GET" ,
@@ -406,12 +347,6 @@ def test_process_with_request_uri_with_params
406
347
assert_equal "/test_case_test/test/test_uri/7" , @response . body
407
348
end
408
349
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
-
415
350
def test_process_with_request_uri_with_params_with_explicit_uri
416
351
@request . env [ "PATH_INFO" ] = "/explicit/uri"
417
352
process :test_uri , method : "GET" , params : { id : 7 }
@@ -491,20 +426,6 @@ def test_assert_routing_with_glob
491
426
end
492
427
end
493
428
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
-
508
429
def test_params_passing
509
430
get :test_params , params : {
510
431
page : {
@@ -589,16 +510,6 @@ def test_params_passing_path_parameter_is_string_when_not_html_request
589
510
)
590
511
end
591
512
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
-
602
513
def test_params_passing_with_frozen_values
603
514
assert_nothing_raised do
604
515
get :test_params , params : {
@@ -683,11 +594,6 @@ def test_id_converted_to_string
683
594
assert_kind_of String , @request . path_parameters [ :id ]
684
595
end
685
596
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
-
691
597
def test_array_path_parameter_handled_properly
692
598
with_routing do |set |
693
599
set . draw do
@@ -757,14 +663,6 @@ def test_xhr_with_session
757
663
assert_equal "it works" , session [ :symbol ] , "Test session hash should allow indifferent access"
758
664
end
759
665
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
-
768
666
def test_params_reset_between_post_requests
769
667
post :no_op , params : { foo : "bar" }
770
668
assert_equal "bar" , @request . params [ :foo ]
@@ -964,15 +862,6 @@ def test_fixture_file_upload_ignores_nil_fixture_path
964
862
assert_equal File . open ( "#{ FILES_DIR } /mona_lisa.jpg" , READ_PLAIN ) . read , uploaded_file . read
965
863
end
966
864
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
-
976
865
def test_action_dispatch_uploaded_file_upload
977
866
filename = "mona_lisa.jpg"
978
867
path = "#{ FILES_DIR } /#{ filename } "
0 commit comments