Fix tests

This commit is contained in:
mo8it 2024-06-26 15:12:58 +02:00
parent 097f3c74ea
commit 2afe6b38d3
2 changed files with 8 additions and 5 deletions

View file

@ -32,9 +32,10 @@ mod tests {
#[test]
fn explains_why_generating_nametag_text_fails() {
assert_eq!(
generate_nametag_text(String::new()).as_deref(),
// Don't change this line
Err("`name` was empty; it must be nonempty."),
generate_nametag_text(String::new())
.as_ref()
.map_err(|e| e.as_str()),
Err("Empty names aren't allowed"),
);
}
}

View file

@ -28,8 +28,10 @@ mod tests {
#[test]
fn explains_why_generating_nametag_text_fails() {
assert_eq!(
generate_nametag_text(String::new()).as_deref(),
Err("`name` was empty; it must be nonempty."),
generate_nametag_text(String::new())
.as_ref()
.map_err(|e| e.as_str()),
Err("Empty names aren't allowed"),
);
}
}