use super::lifecycle::PassportStatus;
#[test]
fn all_lists_every_variant() {
for status in PassportStatus::ALL {
match status {
PassportStatus::Draft
| PassportStatus::Published
| PassportStatus::Suspended
| PassportStatus::Archived
| PassportStatus::Superseded
| PassportStatus::Deactivated => {}
}
}
assert_eq!(
PassportStatus::ALL.len(),
6,
"a variant was added to the match above but not to ALL"
);
}
#[test]
fn all_wire_strings_are_distinct() {
let mut seen = std::collections::BTreeSet::new();
for status in PassportStatus::ALL {
assert!(
seen.insert(status.to_string()),
"two statuses serialise to the same wire string: {status}"
);
}
}