diff --git a/tests/oauth_client_real_operator.rs b/tests/oauth_client_real_operator.rs index 5bc811d..978ac34 100644 --- a/tests/oauth_client_real_operator.rs +++ b/tests/oauth_client_real_operator.rs @@ -21,4 +21,15 @@ async fn run_starting_errors_when_stdout_not_tty() { report.code().map(|c| c.to_string()), Some("oauth_client::interactive::operator::not_a_tty".to_string()), ); + // AC9.1 also pins the human-visible message string: the report + // must render the documented "interactive mode requires a TTY" + // phrase. Asserting this here keeps the wording stable across + // refactors — silently shortening the message (e.g. to "TTY + // required") would not change the diagnostic code but would + // regress the operator-facing prose. + let rendered = format!("{report:?}"); + assert!( + rendered.contains("interactive mode requires a TTY"), + "expected the rendered miette report to contain the AC9.1 message string, got:\n{rendered}", + ); }