Compare commits
1 Commits
a590d24805
...
e0da5764fb
| Author | SHA1 | Date | |
|---|---|---|---|
| e0da5764fb |
@@ -158,13 +158,10 @@ mod tests {
|
|||||||
assert_eq!(name.content, "hello");
|
assert_eq!(name.content, "hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
fn test_try_from_single_hyphen() {
|
fn test_try_from_single_hyphen() {
|
||||||
let name = Rfc1123Name::try_from("-").unwrap();
|
let name = Rfc1123Name::try_from("-");
|
||||||
assert!(name.content.is_empty());
|
assert!(name.is_err());
|
||||||
// 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, "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user