Check the implementation of Display in the tests.

This commit is contained in:
LukeMathWalker 2024-05-14 10:03:45 +02:00
parent d9a0c025e9
commit ae7769d879
1 changed files with 6 additions and 0 deletions

View File

@ -95,5 +95,11 @@ mod tests {
assert_eq!(ticket.description, "Description not provided");
}
#[test]
fn display_is_correctly_implemented() {
let ticket = Ticket::new("".into(), valid_description(), Status::ToDo);
assert_eq!(format!("{}", ticket.unwrap_err()), "Title cannot be empty");
}
assert_impl_one!(TicketNewError: std::error::Error);
}