From f053e937b588a03475a6399a03cb91c77c1075f1 Mon Sep 17 00:00:00 2001 From: Jorge Javier Araya Navarro Date: Fri, 20 Sep 2024 16:33:34 -0600 Subject: [PATCH] Be specific about the error for a test case --- internal/tests/notrequireargsinsubcommands_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/tests/notrequireargsinsubcommands_test.go b/internal/tests/notrequireargsinsubcommands_test.go index e052145d..2c1f0a18 100644 --- a/internal/tests/notrequireargsinsubcommands_test.go +++ b/internal/tests/notrequireargsinsubcommands_test.go @@ -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) {