Fix template name in profile result for render tag timing objects

This commit is contained in:
Dylan Thacker-Smith
2020-12-09 10:01:16 -05:00
parent f18084203d
commit 900e3a6491
3 changed files with 25 additions and 48 deletions
+11
View File
@@ -62,6 +62,17 @@ class RenderProfilingTest < Minitest::Test
assert_equal(2, included_children[1].line_number)
end
def test_profiling_render_tag
t = Template.parse("{% render 'a_template' %}", profile: true)
t.render!
render_children = t.profiler[0].children
render_children.each do |timing|
assert_equal('a_template', timing.partial)
end
assert_equal([1, 2], render_children.map(&:line_number))
end
def test_profiling_times_the_rendering_of_tokens
t = Template.parse("{% include 'a_template' %}", profile: true)
t.render!