1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #23662 from rthbound/adds-missing-digestor-nested-deps-tests

adds missing tests for Digestor#nested_dependencies
This commit is contained in:
Yves Senn 2016-02-17 14:36:43 +01:00
commit 735e56e3eb
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,2 @@
<%# Template Dependency: messages/message %>
<%= render "comments/comments" %>

View file

@ -130,6 +130,16 @@ class TemplateDigestorTest < ActionView::TestCase
end
end
def test_getting_of_singly_nested_dependencies
singly_nested_dependencies = ["messages/header", "messages/form", "messages/message", "events/event", "comments/comment"]
assert_equal singly_nested_dependencies, nested_dependencies('messages/edit')
end
def test_getting_of_doubly_nested_dependencies
doubly_nested = [{"comments/comments"=>["comments/comment"]}, "messages/message"]
assert_equal doubly_nested, nested_dependencies('messages/peek')
end
def test_nested_template_directory
assert_digest_difference("messages/show") do
change_template("messages/actions/_move")