mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
adding concat filter to append arrays
This commit is contained in:
@@ -358,6 +358,12 @@ class StandardFiltersTest < Minitest::Test
|
||||
assert_template_result('bcd',"{{ a | append: b}}",assigns)
|
||||
end
|
||||
|
||||
def test_concat
|
||||
assert_equal([1,2,3,4 ], @filters.concat([1,2], [3,4] ))
|
||||
assert_equal([1,2,'a' ], @filters.concat([1,2], ['a'] ))
|
||||
assert_equal([1,2, 10 ], @filters.concat([1,2], [ 10] ))
|
||||
end
|
||||
|
||||
def test_prepend
|
||||
assigns = {'a' => 'bc', 'b' => 'a' }
|
||||
assert_template_result('abc',"{{ a | prepend: 'a'}}",assigns)
|
||||
|
||||
Reference in New Issue
Block a user