Skip to content

Commit

Permalink
dig: Fix invalid test
Browse files Browse the repository at this point in the history
The test was asserting `NoError` for the case where `err != nil` was
already known.
  • Loading branch information
abhinav committed Mar 7, 2017
1 parent be1e111 commit b650879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dig/dig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ func TestResolve(t *testing.T) {
require.NoError(t, err, "Register part of the test cant have errors")

err = tc.resolve(g)
if err != nil {
if tc.es != "" {
require.Error(t, err)
require.Contains(t, err.Error(), tc.es, "Unexpected error message")
} else {
require.NoError(t, err, "Did not expect a resolve error")
Expand Down

0 comments on commit b650879

Please sign in to comment.