mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 19:00:39 -07:00
Regression test for including assignments
This commit is contained in:
@@ -27,6 +27,9 @@ class TestFileSystem
|
|||||||
when "pick_a_source"
|
when "pick_a_source"
|
||||||
"from TestFileSystem"
|
"from TestFileSystem"
|
||||||
|
|
||||||
|
when 'assignments'
|
||||||
|
"{% assign foo = 'bar' %}"
|
||||||
|
|
||||||
else
|
else
|
||||||
template_path
|
template_path
|
||||||
end
|
end
|
||||||
@@ -108,6 +111,10 @@ class IncludeTagTest < Minitest::Test
|
|||||||
'echo1' => 'test123', 'more_echos' => { "echo2" => 'test321'}
|
'echo1' => 'test123', 'more_echos' => { "echo2" => 'test321'}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_included_templates_assigns_variables
|
||||||
|
assert_template_result "bar", "{% include 'assignments' %}{{ foo }}"
|
||||||
|
end
|
||||||
|
|
||||||
def test_nested_include_tag
|
def test_nested_include_tag
|
||||||
assert_template_result "body body_detail", "{% include 'body' %}"
|
assert_template_result "body body_detail", "{% include 'body' %}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user