diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-05-18 18:12:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 18:12:32 +0200 |
commit | 75fa8dd309a84e125b59d01bf182d88419631eaa (patch) | |
tree | d76aa54a79b7bf07d6e6c5d3f6c07237e5f4af60 /actionmailer | |
parent | 385d9af299fbfac7f063de214d371545bafef5df (diff) | |
download | rails-75fa8dd309a84e125b59d01bf182d88419631eaa.tar.gz rails-75fa8dd309a84e125b59d01bf182d88419631eaa.tar.bz2 rails-75fa8dd309a84e125b59d01bf182d88419631eaa.zip |
Use recyclable cache keys (#29092)
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/test/caching_test.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/actionmailer/test/caching_test.rb b/actionmailer/test/caching_test.rb index cff49c8894..5869eae7fd 100644 --- a/actionmailer/test/caching_test.rb +++ b/actionmailer/test/caching_test.rb @@ -21,10 +21,6 @@ class BaseCachingTest < ActiveSupport::TestCase @mailer.perform_caching = true @mailer.cache_store = @store end - - def test_fragment_cache_key - assert_equal "views/what a key", @mailer.fragment_cache_key("what a key") - end end class FragmentCachingTest < BaseCachingTest @@ -126,7 +122,7 @@ class FunctionalFragmentCachingTest < BaseCachingTest assert_match expected_body, email.body.encoded assert_match expected_body, - @store.read("views/caching/#{template_digest("caching_mailer/fragment_cache")}") + @store.read("views/caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache")}/caching") end def test_fragment_caching_in_partials @@ -135,7 +131,7 @@ class FunctionalFragmentCachingTest < BaseCachingTest assert_match(expected_body, email.body.encoded) assert_match(expected_body, - @store.read("views/caching/#{template_digest("caching_mailer/_partial")}")) + @store.read("views/caching_mailer/_partial:#{template_digest("caching_mailer/_partial")}/caching")) end def test_skip_fragment_cache_digesting @@ -185,7 +181,7 @@ class FunctionalFragmentCachingTest < BaseCachingTest end assert_equal "caching_mailer", payload[:mailer] - assert_equal "views/caching/#{template_digest("caching_mailer/fragment_cache")}", payload[:key] + assert_equal [ :views, "caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache")}", :caching ], payload[:key] ensure @mailer.enable_fragment_cache_logging = true end |