add an unit test for double nest variable lookup

This commit is contained in:
Michael Go
2023-01-30 20:36:14 -04:00
parent 1aaf6ed019
commit dd257b3d66
+12
View File
@@ -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