func TestStatusCommandValidation(t *testing.T) { t.Skip("Skipping status command validation test - Args function issues") } TestRunStatus verifies that the RunStatus function handles non-interactive mode correctly: it either succeeds (if authenticated) or returns an auth error (if not). No TTY erro
(t *testing.T)
| 69 | // non-interactive mode correctly: it either succeeds (if authenticated) |
| 70 | // or returns an auth error (if not). No TTY error should occur. |
| 71 | func TestRunStatus(t *testing.T) { |
| 72 | err := RunStatus() |
| 73 | if err != nil { |
| 74 | errStr := err.Error() |
| 75 | isAuthError := strings.Contains(errStr, "not authenticated") || strings.Contains(errStr, "authentication") |
| 76 | assert.True(t, isAuthError, "Expected auth error or nil, got: %v", err) |
| 77 | } |
| 78 | // nil is acceptable — means the status was fetched and printed in non-interactive mode |
| 79 | } |