use Utils.to_liquid_value on conditionals

This commit is contained in:
Michael Go
2021-06-14 18:19:37 -03:00
parent 017c1b5e83
commit f686c5dec7
2 changed files with 4 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ class VariableTest < Minitest::Test
def test_if_tag_calls_to_liquid_value
assert_template_result('one', '{% if foo == 1 %}one{% endif %}', 'foo' => IntegerDrop.new('1'))
assert_template_result('one', '{% if 0 < foo %}one{% endif %}', 'foo' => IntegerDrop.new('1'))
assert_template_result('one', '{% if foo > 0 %}one{% endif %}', 'foo' => IntegerDrop.new('1'))
assert_template_result('true', '{% if foo == true %}true{% endif %}', 'foo' => BooleanDrop.new(true))
assert_template_result('true', '{% if foo %}true{% endif %}', 'foo' => BooleanDrop.new(true))