@@ -252,27 +252,27 @@ def test_action_cache_with_layout_and_layout_cache_false
252
252
end
253
253
254
254
def test_action_cache_with_layout_and_layout_cache_false_via_proc
255
- get :with_layout_proc_param , layout : false
255
+ get :with_layout_proc_param , params : { layout : false }
256
256
assert_response :success
257
257
cached_time = content_to_cache
258
258
assert_not_equal cached_time , @response . body
259
259
assert fragment_exist? ( 'hostname.com/action_caching_test/with_layout_proc_param' )
260
260
261
- get :with_layout_proc_param , layout : false
261
+ get :with_layout_proc_param , params : { layout : false }
262
262
assert_response :success
263
263
assert_not_equal cached_time , @response . body
264
264
body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' ) )
265
265
assert_equal cached_time , body
266
266
end
267
267
268
268
def test_action_cache_with_layout_and_layout_cache_true_via_proc
269
- get :with_layout_proc_param , layout : true
269
+ get :with_layout_proc_param , params : { layout : true }
270
270
assert_response :success
271
271
cached_time = content_to_cache
272
272
assert_not_equal cached_time , @response . body
273
273
assert fragment_exist? ( 'hostname.com/action_caching_test/with_layout_proc_param' )
274
274
275
- get :with_layout_proc_param , layout : true
275
+ get :with_layout_proc_param , params : { layout : true }
276
276
assert_response :success
277
277
assert_not_equal cached_time , @response . body
278
278
body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' ) )
@@ -332,7 +332,7 @@ def test_action_cache_with_custom_cache_path_in_block
332
332
assert_response :success
333
333
assert fragment_exist? ( 'test.host/edit' )
334
334
335
- get :edit , id : 1
335
+ get :edit , params : { id : 1 }
336
336
assert_response :success
337
337
assert fragment_exist? ( 'test.host/1;edit' )
338
338
end
@@ -342,7 +342,7 @@ def test_action_cache_with_custom_cache_path_with_custom_object
342
342
assert_response :success
343
343
assert fragment_exist? ( 'controller' )
344
344
345
- get :custom_cache_path , id : 1
345
+ get :custom_cache_path , params : { id : 1 }
346
346
assert_response :success
347
347
assert fragment_exist? ( 'controller-1' )
348
348
end
@@ -470,8 +470,8 @@ def test_xml_version_of_resource_is_treated_as_different_cache
470
470
471
471
def test_correct_content_type_is_returned_for_cache_hit
472
472
# run it twice to cache it the first time
473
- get :index , id : 'content-type' , format : 'xml'
474
- get :index , id : 'content-type' , format : 'xml'
473
+ get :index , params : { id : 'content-type' } , format : 'xml'
474
+ get :index , params : { id : 'content-type' } , format : 'xml'
475
475
assert_response :success
476
476
assert_equal 'application/xml' , @response . content_type
477
477
end
@@ -486,8 +486,8 @@ def test_correct_content_type_is_returned_for_cache_hit_on_action_with_string_ke
486
486
487
487
def test_correct_content_type_is_returned_for_cache_hit_on_action_with_string_key_from_proc
488
488
# run it twice to cache it the first time
489
- get :edit , id : 1 , format : 'xml'
490
- get :edit , id : 1 , format : 'xml'
489
+ get :edit , params : { id : 1 } , format : 'xml'
490
+ get :edit , params : { id : 1 } , format : 'xml'
491
491
assert_response :success
492
492
assert_equal 'application/xml' , @response . content_type
493
493
end
@@ -500,8 +500,8 @@ def test_empty_path_is_normalized
500
500
end
501
501
502
502
def test_file_extensions
503
- get :index , id : 'kitten.jpg'
504
- get :index , id : 'kitten.jpg'
503
+ get :index , params : { id : 'kitten.jpg' }
504
+ get :index , params : { id : 'kitten.jpg' }
505
505
506
506
assert_response :success
507
507
end
0 commit comments