Compare commits
1 Commits
a590d24805
...
e0da5764fb
| Author | SHA1 | Date | |
|---|---|---|---|
| e0da5764fb |
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user