1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 08:18:59 +01:00
liquid/evaluator/predicates_test.go
Oliver Steele cf54755949 Remove obsolete generic predicates
The Value interface now does this
2017-07-21 16:02:30 -04:00

17 lines
375 B
Go

package evaluator
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestIsEmpty(t *testing.T) {
require.True(t, IsEmpty(false))
require.False(t, IsEmpty(true))
require.True(t, IsEmpty([]string{}))
require.True(t, IsEmpty(map[string]interface{}{}))
require.False(t, IsEmpty([]string{""}))
require.False(t, IsEmpty(map[string]interface{}{"k": "v"}))
}