diff options
author | Ryan T. Hosford <tad.hosford@gmail.com> | 2016-02-13 03:28:05 -0600 |
---|---|---|
committer | Ryan T. Hosford <tad.hosford@gmail.com> | 2016-02-13 11:11:37 -0600 |
commit | fe698bad34dbb11679c6951132bb46375b4ad8af (patch) | |
tree | bd207e172fcf13663e527ac0a94391c4aebc59b1 /actionview/test | |
parent | ac9d32bf90ce3d2205be02b58743676868286123 (diff) | |
download | rails-fe698bad34dbb11679c6951132bb46375b4ad8af.tar.gz rails-fe698bad34dbb11679c6951132bb46375b4ad8af.tar.bz2 rails-fe698bad34dbb11679c6951132bb46375b4ad8af.zip |
adds tests for Digestor#nested_dependencies
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/fixtures/digestor/messages/peek.html.erb | 2 | ||||
-rw-r--r-- | actionview/test/template/digestor_test.rb | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/actionview/test/fixtures/digestor/messages/peek.html.erb b/actionview/test/fixtures/digestor/messages/peek.html.erb new file mode 100644 index 0000000000..84885ab0bc --- /dev/null +++ b/actionview/test/fixtures/digestor/messages/peek.html.erb @@ -0,0 +1,2 @@ +<%# Template Dependency: messages/message %> +<%= render "comments/comments" %> diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index bfab97cf1e..e50caac6d8 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -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") |