mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 01:40:42 -07:00
Remove to_liquid conversion from StandardFilters
This commit is contained in:
@@ -149,6 +149,8 @@ class DropsTest < Minitest::Test
|
||||
assert_equal(' carrot ', output)
|
||||
end
|
||||
|
||||
# This test succeed in the ruby implementation, but not in liquid-c
|
||||
# See Context#contextualize
|
||||
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)
|
||||
|
||||
@@ -417,6 +417,8 @@ class StandardFiltersTest < Minitest::Test
|
||||
assert_template_result("", '{{ "foo" | map: "inspect" }}')
|
||||
end
|
||||
|
||||
# This test succeed in the ruby implementation, but not in liquid-c
|
||||
# See Context#contextualize
|
||||
def test_map_calls_to_liquid
|
||||
t = TestThing.new
|
||||
assert_template_result("woot: 1", '{{ foo | map: "whatever" }}', "foo" => [t])
|
||||
@@ -433,6 +435,8 @@ class StandardFiltersTest < Minitest::Test
|
||||
assert_template_result("42", template, "thing" => hash)
|
||||
end
|
||||
|
||||
# This test succeed in the ruby implementation, but not in liquid-c
|
||||
# See Context#contextualize
|
||||
def test_sort_calls_to_liquid
|
||||
t = TestThing.new
|
||||
Liquid::Template.parse('{{ foo | sort: "whatever" }}').render("foo" => [t])
|
||||
|
||||
Reference in New Issue
Block a user