Add tests for assign tag fix

This commit is contained in:
Tristan Hume
2014-08-11 13:06:01 -04:00
parent 2809ec780a
commit 4db22be8ba
+11
View File
@@ -24,4 +24,15 @@ class AssignTest < Minitest::Test
'{% assign foo not values %}.', '{% assign foo not values %}.',
'values' => "foo,bar,baz") 'values' => "foo,bar,baz")
end end
def test_assign_uses_error_mode
with_error_mode(:strict) do
assert_raises(SyntaxError) do
Template.parse("{% assign foo = ('X' | downcase) %}")
end
end
with_error_mode(:lax) do
assert Template.parse("{% assign foo = ('X' | downcase) %}")
end
end
end # AssignTest end # AssignTest