Resolve InputIterator dropping context

This commit is contained in:
Mike Angell
2019-10-09 03:28:09 +11:00
parent ffadc64f28
commit fbe14cd0b7
2 changed files with 21 additions and 10 deletions
+5
View File
@@ -179,6 +179,11 @@ class DropsTest < Minitest::Test
assert_equal(' carrot ', output)
end
def test_context_drop_array_with_map
output = Liquid::Template.parse(' {{ contexts | map: "bar" }} ').render!('contexts' => [ContextDrop.new, ContextDrop.new], 'bar' => "carrot")
assert_equal(' carrotcarrot ', output)
end
def test_nested_context_drop
output = Liquid::Template.parse(' {{ product.context.foo }} ').render!('product' => ProductDrop.new, 'foo' => "monkey")
assert_equal(' monkey ', output)