From b5a9525932a3beb9ccb6040b34cfb75a19e5fb9c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 8 Jul 2015 16:15:50 -0700 Subject: pass the variant as a parameter to more reflect real world apps --- actionpack/test/controller/caching_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index abb004d528..5698159eba 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -162,6 +162,8 @@ class FunctionalCachingController < CachingController end def formatted_fragment_cached_with_variant + request.variant = :phone if params[:v] == "phone" + respond_to do |format| format.html.phone format.html @@ -262,9 +264,7 @@ CACHED def test_fragment_caching_with_variant - @request.variant = :phone - - get :formatted_fragment_cached_with_variant, format: "html" + get :formatted_fragment_cached_with_variant, format: "html", params: { v: :phone } assert_response :success expected_body = "\n

PHONE

\n\n" -- cgit v1.2.3