aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@github.com>2019-02-19 13:45:30 -0800
committerGitHub <noreply@github.com>2019-02-19 13:45:30 -0800
commitff6b713f5e729859995f204093ad3f8e08f39ea8 (patch)
tree2729530ac520a01230e9a632fde5d549e140a5e7 /actionmailer
parent16a8072e2db29d5ec895830dca995f99ce1915d6 (diff)
parentdf12a1b2413906ee38a977e3cbb325512c184837 (diff)
downloadrails-ff6b713f5e729859995f204093ad3f8e08f39ea8.tar.gz
rails-ff6b713f5e729859995f204093ad3f8e08f39ea8.tar.bz2
rails-ff6b713f5e729859995f204093ad3f8e08f39ea8.zip
Merge pull request #35293 from rails/remove-rendered-format-from-cache
Pass the template format to the digestor
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/caching_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionmailer/test/caching_test.rb b/actionmailer/test/caching_test.rb
index 22f310f39f..b658c96ec7 100644
--- a/actionmailer/test/caching_test.rb
+++ b/actionmailer/test/caching_test.rb
@@ -124,7 +124,7 @@ class FunctionalFragmentCachingTest < BaseCachingTest
assert_match expected_body, email.body.encoded
assert_match expected_body,
- @store.read("views/caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache")}/caching")
+ @store.read("views/caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache", "html")}/caching")
end
def test_fragment_caching_in_partials
@@ -133,7 +133,7 @@ class FunctionalFragmentCachingTest < BaseCachingTest
assert_match(expected_body, email.body.encoded)
assert_match(expected_body,
- @store.read("views/caching_mailer/_partial:#{template_digest("caching_mailer/_partial")}/caching"))
+ @store.read("views/caching_mailer/_partial:#{template_digest("caching_mailer/_partial", "html")}/caching"))
end
def test_skip_fragment_cache_digesting
@@ -183,15 +183,15 @@ class FunctionalFragmentCachingTest < BaseCachingTest
end
assert_equal "caching_mailer", payload[:mailer]
- assert_equal [ :views, "caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache")}", :caching ], payload[:key]
+ assert_equal [ :views, "caching_mailer/fragment_cache:#{template_digest("caching_mailer/fragment_cache", "html")}", :caching ], payload[:key]
ensure
@mailer.enable_fragment_cache_logging = true
end
private
- def template_digest(name)
- ActionView::Digestor.digest(name: name, finder: @mailer.lookup_context)
+ def template_digest(name, format)
+ ActionView::Digestor.digest(name: name, format: format, finder: @mailer.lookup_context)
end
end