(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestPromptSecretInput(t *testing.T) { |
| 13 | t.Run("function signature", func(t *testing.T) { |
| 14 | // Verify the function exists and has the right signature |
| 15 | _ = PromptSecretInput |
| 16 | }) |
| 17 | |
| 18 | t.Run("validates parameters", func(t *testing.T) { |
| 19 | title := "Enter Secret" |
| 20 | description := "Secret value will be masked" |
| 21 | |
| 22 | // Function exists and parameters are accepted |
| 23 | _, err := PromptSecretInput(title, description) |
| 24 | // Will error in test environment (no TTY), but that's expected |
| 25 | require.Error(t, err, "Should error when not in TTY") |
| 26 | assert.Contains(t, err.Error(), "not a TTY", "Error should mention TTY") |
| 27 | }) |
| 28 | } |
nothing calls this directly
no test coverage detected