diff --git a/test/integration/variable_test.rb b/test/integration/variable_test.rb index 192a3fe9..0cb8bddc 100644 --- a/test/integration/variable_test.rb +++ b/test/integration/variable_test.rb @@ -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