1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-26 23:34:47 +01:00
liquid/expressions/functional_test.go
2017-07-13 20:18:23 -04:00

23 lines
467 B
Go

package expressions
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestConstant(t *testing.T) {
ctx := NewContext(map[string]interface{}{}, NewConfig())
k := Constant(10)
v, err := k.Evaluate(ctx)
require.NoError(t, err)
require.Equal(t, 10, v)
}
func TestNot(t *testing.T) {
ctx := NewContext(map[string]interface{}{}, NewConfig())
k := Constant(10)
v, err := Not(k).Evaluate(ctx)
require.NoError(t, err)
require.Equal(t, false, v)
}