mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 19:30:47 -07:00
Add test case for presetting assigns
This commit is contained in:
@@ -131,5 +131,11 @@ class VariableResolutionTest < Test::Unit::TestCase
|
|||||||
template = Template.parse(%|{{ test.test }}|)
|
template = Template.parse(%|{{ test.test }}|)
|
||||||
assert_equal 'worked', template.render('test' => {'test' => 'worked'})
|
assert_equal 'worked', template.render('test' => {'test' => 'worked'})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_preset_assigns
|
||||||
|
template = Template.parse(%|{{ test }}|)
|
||||||
|
template.assigns['test'] = 'worked'
|
||||||
|
assert_equal 'worked', template.render
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user