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:
commit
735e56e3eb
2 changed files with 12 additions and 0 deletions
2
actionview/test/fixtures/digestor/messages/peek.html.erb
vendored
Normal file
2
actionview/test/fixtures/digestor/messages/peek.html.erb
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
<%# Template Dependency: messages/message %>
|
||||
<%= render "comments/comments" %>
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue