mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 18:30:40 -07:00
IF tag
- now properly allows operands to have conditions (eg and, or) [closes #13]
This commit is contained in:
@@ -151,9 +151,10 @@ class IfElseTest < Test::Unit::TestCase
|
||||
Condition.operators.delete 'contains'
|
||||
end
|
||||
|
||||
# def test_operators_are_ignored_unless_isolated
|
||||
# Condition.operators['contains'] = :[]
|
||||
#
|
||||
# assert_template_result('yes', %({% if 'gnomeslab' == 'gnomeslab' %}yes{% endif %}))
|
||||
# end
|
||||
def test_operators_are_ignored_unless_isolated
|
||||
Condition.operators['contains'] = :[]
|
||||
|
||||
assert_template_result('yes',
|
||||
%({% if 'gnomeslab-and-or-liquid' contains 'gnomeslab-and-or-liquid' %}yes{% endif %}))
|
||||
end
|
||||
end # IfElseTest
|
||||
|
||||
Reference in New Issue
Block a user