mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Had the tests in the wrong file
This commit is contained in:
@@ -137,6 +137,18 @@ class StandardFiltersTest < Test::Unit::TestCase
|
|||||||
def test_times
|
def test_times
|
||||||
assert_template_result "12", "{{ 3 | times:4 }}"
|
assert_template_result "12", "{{ 3 | times:4 }}"
|
||||||
assert_template_result "foofoofoofoo", "{{ 'foo' | times:4 }}"
|
assert_template_result "foofoofoofoo", "{{ 'foo' | times:4 }}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_append
|
||||||
|
assigns = {'a' => 'bc', 'b' => 'd' }
|
||||||
|
assert_template_result('bcd',"{{ a | append: 'd'}}",assigns)
|
||||||
|
assert_template_result('bcd',"{{ a | append: b}}",assigns)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_prepend
|
||||||
|
assigns = {'a' => 'bc', 'b' => 'a' }
|
||||||
|
assert_template_result('abc',"{{ a | prepend: 'a'}}",assigns)
|
||||||
|
assert_template_result('abc',"{{ a | prepend: b}}",assigns)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_divided_by
|
def test_divided_by
|
||||||
|
|||||||
@@ -392,18 +392,7 @@ HERE
|
|||||||
assigns = {'array' => [ 1, 2, 3] }
|
assigns = {'array' => [ 1, 2, 3] }
|
||||||
assert_template_result('321','{%for item in array reversed %}{{item}}{%endfor%}',assigns)
|
assert_template_result('321','{%for item in array reversed %}{{item}}{%endfor%}',assigns)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_append
|
|
||||||
assigns = {'a' => 'bc', 'b' => 'd' }
|
|
||||||
assert_template_result('bcd',"{{ a | append: 'd'}}",assigns)
|
|
||||||
assert_template_result('bcd',"{{ a | append: b}}",assigns)
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_prepend
|
|
||||||
assigns = {'a' => 'bc', 'b' => 'a' }
|
|
||||||
assert_template_result('abc',"{{ a | prepend: 'a'}}",assigns)
|
|
||||||
assert_template_result('abc',"{{ a | prepend: b}}",assigns)
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_ifchanged
|
def test_ifchanged
|
||||||
assigns = {'array' => [ 1, 1, 2, 2, 3, 3] }
|
assigns = {'array' => [ 1, 1, 2, 2, 3, 3] }
|
||||||
|
|||||||
Reference in New Issue
Block a user