Skip to content

Commit

Permalink
Added error message check to TestMandatoryVariableErrors test
Browse files Browse the repository at this point in the history
Signed-off-by: Arash Deshmeh <[email protected]>
  • Loading branch information
adshmh committed Feb 26, 2018
1 parent ce54482 commit e33bc48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/compose/template/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package template
import (
"testing"

"github.com/docker/cli/internal/test/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -119,7 +120,8 @@ func TestMandatoryVariableErrors(t *testing.T) {
for _, tc := range testCases {
_, err := Substitute(tc.template, defaultMapping)
assert.Error(t, err)
assert.IsType(t, &InvalidTemplateError{tc.expectedError}, err)
assert.IsType(t, &InvalidTemplateError{}, err)
testutil.ErrorContains(t, err, tc.expectedError)
}
}

Expand Down

0 comments on commit e33bc48

Please sign in to comment.