diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 16:15:50 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 16:15:50 -0700 |
commit | b5a9525932a3beb9ccb6040b34cfb75a19e5fb9c (patch) | |
tree | 6c9c5730328364426106ad533c021ce300972939 | |
parent | 78a5124bf09d0cd285d4d1a6242bd67badb2f621 (diff) | |
download | rails-b5a9525932a3beb9ccb6040b34cfb75a19e5fb9c.tar.gz rails-b5a9525932a3beb9ccb6040b34cfb75a19e5fb9c.tar.bz2 rails-b5a9525932a3beb9ccb6040b34cfb75a19e5fb9c.zip |
pass the variant as a parameter to more reflect real world apps
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 = "<body>\n<p>PHONE</p>\n</body>\n" |