diff --git a/crates/aura-cli/src/research_docs.rs b/crates/aura-cli/src/research_docs.rs index 46c64a8..4338930 100644 --- a/crates/aura-cli/src/research_docs.rs +++ b/crates/aura-cli/src/research_docs.rs @@ -752,4 +752,31 @@ mod tests { ); assert!(!prose.contains("CostInstrumentKeys"), "Debug leak: {prose}"); } + + /// #300 fieldtest (df_4): outside a project (no Aura.toml → `Env::std()`), + /// show's refusal names the missing project — the honest degradation + /// `validate` and `campaign runs` already share ("no Aura.toml found up + /// from ") — never a "project store" that does not exist. Blaming the + /// id sends an author in the wrong directory chasing a registration that + /// was never the problem. The refusal itself (Err → exit 1) is correct + /// and stays. + #[test] + fn show_outside_a_project_names_the_missing_aura_toml_not_the_id() { + let env = Env::std(); + for (verb, result) in [ + ("process show", show_process("deadbeef", &env)), + ("campaign show", show_campaign("deadbeef", &env)), + ] { + let msg = result.expect_err("show outside a project must refuse"); + assert!( + msg.contains("no Aura.toml found up from"), + "{verb} outside a project must name the missing Aura.toml: {msg}" + ); + assert!( + !msg.contains("not found in the project store"), + "{verb} outside a project must not blame the id against a \ + store that does not exist: {msg}" + ); + } + } }