Add parsing quirk test for lookup on variable with literal name (#1325)

This commit is contained in:
Dylan Thacker-Smith
2020-10-21 16:30:17 -04:00
committed by GitHub
parent 8e99b3bd7f
commit 4c6166f989

View File

@@ -122,6 +122,12 @@ class ParsingQuirksTest < Minitest::Test
assert_template_result('', "{{}}")
end
def test_lookup_on_var_with_literal_name
assigns = { "blank" => { "x" => "result" } }
assert_template_result('result', "{{ blank.x }}", assigns)
assert_template_result('result', "{{ blank['x'] }}", assigns)
end
def test_contains_in_id
assert_template_result(' YES ', '{% if containsallshipments == true %} YES {% endif %}', 'containsallshipments' => true)
end