Skip to content

Commit fe96863

Browse files
committed
Send params as strings
In Rails 5.0 we changed to converting true/false to strings whereas previously they were passed to the controller action unchanged so send them as strings for consistency.
1 parent 5438d91 commit fe96863

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/caching_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,34 +284,34 @@ def test_action_cache_with_layout_and_layout_cache_false
284284
end
285285

286286
def test_action_cache_with_layout_and_layout_cache_false_via_proc
287-
get :with_layout_proc_param, params: { layout: false }
288287
draw do
289288
get '/action_caching_test/with_layout_proc_param', to: 'action_caching_test#with_layout_proc_param'
290289
end
291290

291+
get :with_layout_proc_param, params: { layout: 'false' }
292292
assert_response :success
293293
cached_time = content_to_cache
294294
assert_not_equal cached_time, @response.body
295295
assert fragment_exist?('hostname.com/action_caching_test/with_layout_proc_param')
296296

297-
get :with_layout_proc_param, params: { layout: false }
297+
get :with_layout_proc_param, params: { layout: 'false' }
298298
assert_response :success
299299
assert_not_equal cached_time, @response.body
300300
assert_equal cached_time, read_fragment('hostname.com/action_caching_test/with_layout_proc_param')
301301
end
302302

303303
def test_action_cache_with_layout_and_layout_cache_true_via_proc
304-
get :with_layout_proc_param, params: { layout: true }
305304
draw do
306305
get '/action_caching_test/with_layout_proc_param', to: 'action_caching_test#with_layout_proc_param'
307306
end
308307

308+
get :with_layout_proc_param, params: { layout: 'true' }
309309
assert_response :success
310310
cached_time = content_to_cache
311311
assert_not_equal cached_time, @response.body
312312
assert fragment_exist?('hostname.com/action_caching_test/with_layout_proc_param')
313313

314-
get :with_layout_proc_param, params: { layout: true }
314+
get :with_layout_proc_param, params: { layout: 'true' }
315315
assert_response :success
316316
assert_not_equal cached_time, @response.body
317317
assert_equal @response.body, read_fragment('hostname.com/action_caching_test/with_layout_proc_param')

0 commit comments

Comments
 (0)