mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Added a failing test case for for-else
This commit is contained in:
@@ -102,6 +102,12 @@ HERE
|
||||
assigns)
|
||||
end
|
||||
|
||||
def test_for_else
|
||||
assert_template_result('+++', '{%for item in array%}+{%else%}-{%endfor%}', 'array'=>[1,2,3])
|
||||
assert_template_result('-', '{%for item in array%}+{%else%}-{%endfor%}', 'array'=>[])
|
||||
assert_template_result('-', '{%for item in array%}+{%else%}-{%endfor%}', 'array'=>nil)
|
||||
end
|
||||
|
||||
def test_limiting
|
||||
assigns = {'array' => [1,2,3,4,5,6,7,8,9,0]}
|
||||
assert_template_result('12', '{%for i in array limit:2 %}{{ i }}{%endfor%}', assigns)
|
||||
|
||||
Reference in New Issue
Block a user