Skip to content

Commit

Permalink
Be specific about the error for a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
shackra committed Sep 20, 2024
1 parent 3d97ffb commit f053e93
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/tests/notrequireargsinsubcommands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ func TestCallSubCommand(t *testing.T) {

t.Run("should run «capabilities» sub-command without success", func(t *testing.T) {
_, err := entrypoint(ctx, carrier, "capabilities")
require.Error(t, err)
})

t.Run("should run «capabilities name» sub-command successfully", func(t *testing.T) {
_, err := entrypoint(ctx, carrier, "capabilities", "name")
require.NoError(t, err)
require.EqualError(t, err, "(Cobra) Execute failed: required flag(s) \"name\" not set")
})

t.Run("should run «completion zsh» sub-command successfully", func(t *testing.T) {
Expand Down

0 comments on commit f053e93

Please sign in to comment.