mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Add parsing quirk test for lookup on variable with literal name (#1325)
This commit is contained in:
committed by
GitHub
parent
8e99b3bd7f
commit
4c6166f989
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user