mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 19:00:39 -07:00
Fix a leaky test that set Tempate.error_mode without resetting it (#1339)
This commit is contained in:
@@ -257,9 +257,8 @@ class TemplateTest < Minitest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_nil_value_does_not_raise
|
def test_nil_value_does_not_raise
|
||||||
Liquid::Template.error_mode = :strict
|
t = Template.parse("some{{x}}thing", error_mode: :strict)
|
||||||
t = Template.parse("some{{x}}thing")
|
result = t.render!({ 'x' => nil }, strict_variables: true)
|
||||||
result = t.render!({ 'x' => nil }, strict_variables: true)
|
|
||||||
|
|
||||||
assert_equal(0, t.errors.count)
|
assert_equal(0, t.errors.count)
|
||||||
assert_equal('something', result)
|
assert_equal('something', result)
|
||||||
|
|||||||
Reference in New Issue
Block a user