mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Fix broken rendering of variables which are equal to false (closes #345)
This commit is contained in:
@@ -25,6 +25,10 @@ class VariableTest < Test::Unit::TestCase
|
||||
assert_equal 'worked', template.render!('test' => {'test' => 'worked'})
|
||||
end
|
||||
|
||||
def test_false_renders_as_false
|
||||
assert_equal 'false', Template.parse("{{ foo }}").render!('foo' => false)
|
||||
end
|
||||
|
||||
def test_preset_assigns
|
||||
template = Template.parse(%|{{ test }}|)
|
||||
template.assigns['test'] = 'worked'
|
||||
|
||||
Reference in New Issue
Block a user