Compare commits

..

1 Commits

Author SHA1 Message Date
e0da5764fb feat(types): Added Rfc1123 String type, useful for k8s names
Some checks failed
Run Check Script / check (pull_request) Failing after 38s
2025-12-15 12:57:52 -05:00

View File

@@ -158,13 +158,10 @@ mod tests {
assert_eq!(name.content, "hello");
}
#[test]
fn test_try_from_single_hyphen() {
let name = Rfc1123Name::try_from("-").unwrap();
assert!(name.content.is_empty());
// TODO this test should not pass, empty string is not rfc 1123 compliant
// We have to refactor and replace convert with try_from and return Err when string turns
// out empty
assert_eq!(name.content, "");
let name = Rfc1123Name::try_from("-");
assert!(name.is_err());
}
#[test]