Fix include tag used with strict_variables (#829)

Fixes https://github.com/Shopify/liquid/issues/828
This commit is contained in:
Lasse Skindstad Ebert
2017-03-22 21:00:31 +01:00
committed by Dylan Thacker-Smith
parent 22f2cec5de
commit 5149cde5c3
4 changed files with 14 additions and 6 deletions

View File

@@ -235,4 +235,11 @@ class IncludeTagTest < Minitest::Test
assert_template_result "Product: Draft 151cm ", "{% assign page = 'product' %}{% include page for foo %}", "foo" => { 'title' => 'Draft 151cm' }
end
def test_including_with_strict_variables
template = Liquid::Template.parse("{% include 'simple' %}", error_mode: :warn)
template.render(nil, strict_variables: true)
assert_equal [], template.errors
end
end # IncludeTagTest