Files
docker-cli/components/engine/pkg/testutil/helpers.go
Daniel Nephin 7daf459b1c Remove unused helpers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a0c9089971b6c3cdc9ac1233f3c5e27a0a723214
Component: engine
2017-08-22 17:15:26 -04:00

14 lines
345 B
Go

package testutil
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// ErrorContains checks that the error is not nil, and contains the expected
// substring.
func ErrorContains(t require.TestingT, err error, expectedError string) {
require.Error(t, err)
assert.Contains(t, err.Error(), expectedError)
}