use std::path::PathBuf;
const JOB: &str = "safe-chains-deps";
fn root() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
}
#[test]
fn agents_md_names_the_upkeep_job() {
let agents = std::fs::read_to_string(root().join("AGENTS.md")).unwrap_or_default();
assert!(!agents.is_empty(), "AGENTS.md is missing or empty; the root is wrong");
assert!(agents.contains(&format!("`{JOB}`")), "AGENTS.md does not name the `{JOB}` upkeep job");
}
#[test]
fn there_is_no_dependabot_config() {
let github = root().join(".github");
for name in ["dependabot.yml", "dependabot.yaml"] {
assert!(!github.join(name).exists(), ".github/{name} exists; updates move through `{JOB}`");
}
}