diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-16 10:57:51 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-16 10:57:51 -0800 |
commit | a3a98606f30e5d2b08419e0dcd1962fc52974c29 (patch) | |
tree | 7ca6b0a8c08394ec9429d270ee5ba2bbb3fc68e9 /actionmailer | |
parent | 1581cab9ff26731ed03a17f7ddec3c85d536988a (diff) | |
download | rails-a3a98606f30e5d2b08419e0dcd1962fc52974c29.tar.gz rails-a3a98606f30e5d2b08419e0dcd1962fc52974c29.tar.bz2 rails-a3a98606f30e5d2b08419e0dcd1962fc52974c29.zip |
pass format to the digestor
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/test/caching_test.rb | 10 |
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 |