use pretty_assertions::assert_eq;
use super::*;
fn model() -> InternalAgentModelConfig {
InternalAgentModelConfig::new(
"anthropic".into(),
"claude-fable-5".into(),
"api-key".into(),
)
}
#[test]
fn each_advisor_state_reads_the_same_way_on_every_surface() {
let cases = [
(
AdvisorStatus::new( false, None),
(None, "off", "off", false),
),
(
AdvisorStatus::new( false, Some(&model())),
(None, "off", "off", false),
),
(
AdvisorStatus::new( true, None),
(
Some("advisor: no model"),
"on · no model",
"on, but no advisor model is selected",
true,
),
),
(
AdvisorStatus::new( true, Some(&model())),
(
Some("advisor: anthropic/claude-fable-5"),
"on · anthropic/claude-fable-5",
"on, anthropic/claude-fable-5 reviews the session",
false,
),
),
];
for (status, (statusline, badge, detail, needs_model)) in cases {
assert_eq!(
(
status.statusline_text().as_deref(),
status.badge().as_str(),
status.detail().as_str(),
status.needs_model(),
),
(statusline, badge, detail, needs_model),
"{status:?}"
);
}
}