zitadel/internal/zerrors/error_test.go

20 lines
339 B
Go
Raw Normal View History

package zerrors_test
2020-03-18 15:45:24 +01:00
import (
"errors"
"testing"
"github.com/stretchr/testify/assert"
"github.com/zitadel/zitadel/internal/zerrors"
2020-03-18 15:45:24 +01:00
)
func TestContains(t *testing.T) {
err := errors.New("hello world")
world := zerrors.Contains(err, "hello")
2020-03-18 15:45:24 +01:00
assert.True(t, world)
mars := zerrors.Contains(err, "mars")
2020-03-18 15:45:24 +01:00
assert.False(t, mars)
}