1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-02 13:37:47 +01:00
liquid/liquid_test.go
Oliver Steele a78d95d73f Coverage
2017-07-18 18:40:19 -04:00

19 lines
534 B
Go

package liquid
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestIsTemplateError(t *testing.T) {
_, err := NewEngine().ParseAndRenderString("{{ syntax error }}", emptyBindings)
require.Error(t, err)
_, err = NewEngine().ParseAndRenderString("{% if %}", emptyBindings)
require.Error(t, err)
_, err = NewEngine().ParseAndRenderString("{% undefined_tag %}", emptyBindings)
require.Error(t, err)
_, err = NewEngine().ParseAndRenderString("{% a | undefined_filter %}", emptyBindings)
require.Error(t, err)
}