1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 05:58:59 +01:00
liquid/values/predicates_test.go

17 lines
372 B
Go
Raw Permalink Normal View History

2017-07-28 00:11:37 +02:00
package values
2017-07-07 13:38:53 +02:00
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"}))
}