diff options
author | Javan Makhmali <javan@javan.us> | 2018-03-18 09:59:47 -0400 |
---|---|---|
committer | Javan Makhmali <javan@javan.us> | 2018-03-20 06:33:20 -0400 |
commit | f4eb2e23a8f61e2766fb32a134bfa6d6b3b7f512 (patch) | |
tree | 6530dc71dbb67bbad5dc799f0a698c5573f2724b /actionview/test/template | |
parent | 9d9f752661c31b3063d55bec14e797c957d2bb7d (diff) | |
download | rails-f4eb2e23a8f61e2766fb32a134bfa6d6b3b7f512.tar.gz rails-f4eb2e23a8f61e2766fb32a134bfa6d6b3b7f512.tar.bz2 rails-f4eb2e23a8f61e2766fb32a134bfa6d6b3b7f512.zip |
Fix digesting templates with mixed formats
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/digestor_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index 1bfa39a319..ddaa7febb3 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -160,6 +160,18 @@ class TemplateDigestorTest < ActionView::TestCase assert_equal [:html], tree_template_formats("messages/show").uniq end + def test_template_dependencies_with_fallback_from_js_to_html_format + finder.rendered_format = :js + assert_equal ["comments/comment"], dependencies("comments/show") + end + + def test_template_digest_with_fallback_from_js_to_html_format + finder.rendered_format = :js + assert_digest_difference("comments/show") do + change_template("comments/_comment") + end + end + def test_recursion_in_renders assert digest("level/recursion") # assert recursion is possible assert_not_nil digest("level/recursion") # assert digest is stored |