mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Use assert_template_result & assert_match_syntax_error in more places (#1611)
This commit is contained in:
@@ -315,13 +315,11 @@ class TemplateTest < Minitest::Test
|
||||
end
|
||||
|
||||
def test_using_range_literal_works_as_expected
|
||||
t = Template.parse("{% assign foo = (x..y) %}{{ foo }}")
|
||||
result = t.render('x' => 1, 'y' => 5)
|
||||
assert_equal('1..5', result)
|
||||
source = "{% assign foo = (x..y) %}{{ foo }}"
|
||||
assert_template_result("1..5", source, { "x" => 1, "y" => 5 })
|
||||
|
||||
t = Template.parse("{% assign nums = (x..y) %}{% for num in nums %}{{ num }}{% endfor %}")
|
||||
result = t.render('x' => 1, 'y' => 5)
|
||||
assert_equal('12345', result)
|
||||
source = "{% assign nums = (x..y) %}{% for num in nums %}{{ num }}{% endfor %}"
|
||||
assert_template_result("12345", source, { "x" => 1, "y" => 5 })
|
||||
end
|
||||
|
||||
def test_source_string_subclass
|
||||
|
||||
Reference in New Issue
Block a user