mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -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
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user