mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
add an unit test for double nest variable lookup
This commit is contained in:
@@ -157,4 +157,16 @@ class VariableTest < Minitest::Test
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_double_nested_variable_lookup
|
||||||
|
assert_template_result(
|
||||||
|
'bar',
|
||||||
|
'{{ list[list[settings.zero]]["foo"] }}',
|
||||||
|
{
|
||||||
|
'list' => [1, { 'foo' => 'bar' }],
|
||||||
|
'settings' => SettingsDrop.new("zero" => 0),
|
||||||
|
'bar' => 'foo',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user