17 lines
367 B
Go
17 lines
367 B
Go
package cli
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"email-mcp/internal/mcpserver"
|
|
)
|
|
|
|
func TestMapAppErrorMapsMCPMissingCredentialError(t *testing.T) {
|
|
err := mapAppError(mcpserver.ErrCredentialsNotConfigured)
|
|
if err == nil {
|
|
t.Fatal("expected mapped error")
|
|
}
|
|
if err.Error() != "credentials not configured; run `email-mcp setup`" {
|
|
t.Fatalf("unexpected error: %v", err)
|
|
}
|
|
}
|